Skip to content

Commit

Permalink
remove digital ocean container registry (#61)
Browse files Browse the repository at this point in the history
use ghcr.io instead
  • Loading branch information
morbalint authored Aug 18, 2024
1 parent c058699 commit 02872f6
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -88,4 +75,4 @@ jobs:
git config --add user.email "[email protected]"
git config --add user.name "Deployment Bot Beta FE"
git commit -a -m "deploy ${{ needs.docker-fe-build.outputs.image_tag }}"
git push
git push

0 comments on commit 02872f6

Please sign in to comment.