build(deps): bump Microsoft.AspNetCore.DataProtection.EntityFrameworkCore from 8.0.6 to 8.0.8 in /Kemkas.Web #91
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI compile & test & build | |
on: | |
push: | |
branches: [ "dev" ] | |
pull_request: | |
branches: [ "dev" ] | |
jobs: | |
docker-be-build: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Log in to GitHub Container Registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- run: | | |
echo "GITHUB_SHA_SHORT=$(echo ${GITHUB_SHA::8})" >> $GITHUB_ENV | |
echo "registry.digitalocean.com/kemkas/kemkas-be:${GITHUB_SHA::8}" | |
echo "ghcr.io/${{ github.repository_owner }}/kemkas-backend:${GITHUB_SHA::8}" | |
- uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: Kemkas.Web/Dockerfile | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
push: false | |
load: true | |
tags: | | |
ghcr.io/${{ github.repository_owner }}/kemkas-backend:${{ env.GITHUB_SHA_SHORT }} | |
registry.digitalocean.com/kemkas/kemkas-be:${{ env.GITHUB_SHA_SHORT }} | |
- name: Install doctl | |
uses: digitalocean/action-doctl@v2 | |
with: | |
token: ${{ secrets.DO_ACCESS_TOKEN }} | |
- name: Log in to DigitalOcean Container Registry with short-lived credentials | |
run: doctl registry login --expiry-seconds 1200 | |
- run: | | |
docker push ghcr.io/${{ github.repository_owner }}/kemkas-backend:${{ env.GITHUB_SHA_SHORT }} | |
docker push registry.digitalocean.com/kemkas/kemkas-be:${{ env.GITHUB_SHA_SHORT }} | |
- uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.repository_owner }}/kemkas-deployment | |
ref: refs/heads/main | |
path: ./deployment-repo | |
clean: false | |
ssh-key: ${{ secrets.DEPLOYMENT_REPO_DEPLOY_KEY }} | |
- uses: mikefarah/yq@v4 | |
with: | |
cmd: yq -i '.spec.template.spec.containers[0].image = "registry.digitalocean.com/kemkas/kemkas-be:${{ env.GITHUB_SHA_SHORT }}"' ./deployment-repo/kemkas-beta/kemkas-be-deployment.yaml | |
- run: | | |
cd ./deployment-repo | |
git config --add user.email "[email protected]" | |
git config --add user.name "Deployment Bot" | |
git commit -a -m "deploy registry.digitalocean.com/kemkas/kemkas-be:${{ env.GITHUB_SHA_SHORT }}" | |
git push |