mirror of
https://github.com/morbalint/kemkas.git
synced 2026-07-17 19:03:46 +00:00
@@ -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
|
||||
git push
|
||||
|
||||
Reference in New Issue
Block a user