Skip to content

Commit

Permalink
Split up image push & deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
madwort committed Jan 9, 2025
1 parent d9e5bf4 commit 8ec8787
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ jobs:
- name: Run tests
run: make test

- name: Deploy to dokku
if: github.ref == 'refs/heads/main'
- name: Publish docker image
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login $REGISTRY -u ${{ github.actor }} --password-stdin
docker tag $IMAGE_NAME $PUBLIC_IMAGE_NAME:latest
docker push $PUBLIC_IMAGE_NAME:latest
- name: Deploy to dokku
# if: github.ref == 'refs/heads/main'
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.DOKKU3_DEPLOY_SSH_KEY }}"
SHA=$(docker inspect --format='{{index .RepoDigests 0}}' $PUBLIC_IMAGE_NAME:latest)
Expand Down

0 comments on commit 8ec8787

Please sign in to comment.