From 8ec8787e9e86148197bfc4cf209e2668ec5dab12 Mon Sep 17 00:00:00 2001 From: Tom Ward Date: Thu, 9 Jan 2025 15:57:56 +0000 Subject: [PATCH] Split up image push & deploy --- .github/workflows/deploy.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 4d436ac..222bbc3 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -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)