Skip to content

Merge pull request #12 from alkem-io/text-refinement6 #3

Merge pull request #12 from alkem-io/text-refinement6

Merge pull request #12 from alkem-io/text-refinement6 #3

name: Deploy to Acceptance
on:
push:
branches: [develop]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Checkout GitHub Action"
uses: actions/[email protected]
- name: "Login into ACR"
uses: azure/docker-login@v2
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: "Build & Push image"
run: |
docker build -f Dockerfile . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-documentation:${{ github.sha }} -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-documentation:latest
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-documentation:${{ github.sha }}
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: "Checkout GitHub Action"
uses: actions/[email protected]
- name: Set up Kubeconfig for Scaleway
run: |
mkdir -p $HOME/.kube # Ensure the .kube directory exists
echo "${{ secrets.KUBECONFIG_SECRET_SCALEWAY_ACC }}" > $HOME/.kube/config
chmod 600 $HOME/.kube/config
- name: Install Kubectl
uses: azure/[email protected]
with:
version: "v1.27.6" # Ensure this matches the version used in your cluster
- name: Create Image Pull Secret
run: |
kubectl create secret docker-registry alkemio-documentation-secret \
--docker-server=${{ secrets.REGISTRY_LOGIN_SERVER }} \
--docker-username=${{ secrets.REGISTRY_USERNAME }} \
--docker-password=${{ secrets.REGISTRY_PASSWORD }} \
--dry-run=client -o yaml | kubectl apply -f -
- name: Deploy to Scaleway
uses: azure/[email protected]
with:
manifests: |
manifests/25-documentation-deployment-dev.yaml
images: |
${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-documentation:${{ github.sha }}
imagepullsecrets: |
alkemio-documentation-secret