From 02872f61ce220c7fccdd9bf4abf6c3e207eda2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20M=C3=B3r=C3=A1sz?= Date: Sun, 18 Aug 2024 11:55:35 +0200 Subject: [PATCH] remove digital ocean container registry (#61) use ghcr.io instead --- .github/workflows/ci.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28d87ad..d8b10bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,35 +41,22 @@ jobs: steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 - - 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 - name: Log in to GitHub Container Registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - id: get_image_tag run: | echo "GITHUB_SHA_SHORT=$(echo ${GITHUB_SHA::8})" >> $GITHUB_ENV - echo "registry.digitalocean.com/kemkas/kemkas-fe:${GITHUB_SHA::8}" echo "ghcr.io/${{ github.repository_owner }}/kemkas-frontend:${GITHUB_SHA::8}" - echo "image_tag=registry.digitalocean.com/kemkas/kemkas-fe:${GITHUB_SHA::8}" >> $GITHUB_OUTPUT + echo "image_tag=ghcr.io/${{ github.repository_owner }}/kemkas-fe:${GITHUB_SHA::8}" >> $GITHUB_OUTPUT - uses: docker/build-push-action@v5 with: context: ./frontend/ file: ./frontend/Dockerfile cache-from: type=gha cache-to: type=gha,mode=max - push: false - load: true + push: true tags: | - registry.digitalocean.com/kemkas/kemkas-fe:${{ env.GITHUB_SHA_SHORT }} ghcr.io/${{ github.repository_owner }}/kemkas-frontend:${{ env.GITHUB_SHA_SHORT }} - - name: Push image to Container Registry - run: | - docker push registry.digitalocean.com/kemkas/kemkas-fe:${GITHUB_SHA::8} - docker push ghcr.io/${{ github.repository_owner }}/kemkas-frontend:${GITHUB_SHA::8} deploy-to-beta: runs-on: ubuntu-latest @@ -88,4 +75,4 @@ jobs: git config --add user.email "beta-fe-deployment-bot@kemkas.hu" git config --add user.name "Deployment Bot Beta FE" git commit -a -m "deploy ${{ needs.docker-fe-build.outputs.image_tag }}" - git push \ No newline at end of file + git push