diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ddbf7b2..9dd90a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,12 +15,6 @@ 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 - run: | @@ -38,6 +32,12 @@ jobs: 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 }} @@ -56,4 +56,4 @@ jobs: git config --add user.email "deployment-bot@kemkas.hu" git config --add user.name "Deployment Bot" git commit -a -m "deploy registry.digitalocean.com/kemkas/kemkas-be:${{ env.GITHUB_SHA_SHORT }}" - git push \ No newline at end of file + git push