From 8811a10b4dca82d0e2149c0c6e1c53dc8d88116c Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sun, 29 Mar 2026 13:45:09 -0500 Subject: [PATCH] use-existing-docker-daemon (#227) Reviewed-on: https://git.mcintire.me/graham/towerops-web/pulls/227 --- .forgejo/workflows/production.yaml | 43 +++--------------------------- 1 file changed, 4 insertions(+), 39 deletions(-) diff --git a/.forgejo/workflows/production.yaml b/.forgejo/workflows/production.yaml index 34d719da..ce5962a8 100644 --- a/.forgejo/workflows/production.yaml +++ b/.forgejo/workflows/production.yaml @@ -79,12 +79,10 @@ jobs: - name: Run tests run: mix test - build-image: + build-and-push: name: Build and Push Docker Image runs-on: ubuntu-22.04 needs: [test-exunit] - outputs: - image_tag: ${{ steps.tag.outputs.tag }} steps: - name: Checkout code @@ -121,46 +119,13 @@ jobs: docker push "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${IMAGE_TAG}" docker push "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:production" - update-manifest: - name: Update Deployment Manifest - runs-on: ubuntu-22.04 - needs: [build-image] - - steps: - - name: Checkout code - uses: https://github.com/actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Update deployment manifest - run: | - IMAGE_TAG="${{ needs.build-image.outputs.image_tag }}" - - git config user.name "Forgejo Actions" - git config user.email "actions@git.mcintire.me" - - git fetch origin production - git checkout production - git pull origin production --rebase - git merge origin/main --no-edit - - sed -i "s|image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:.*|image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${IMAGE_TAG}|g" k8s/deployment.yaml - - git add k8s/deployment.yaml - if git diff --staged --quiet; then - echo "No changes to deployment.yaml" - else - git commit -m "chore: update production image to ${IMAGE_TAG} [skip ci]" - git push origin production - fi - - name: Deployment summary run: | - echo "### ✅ Production Deployment Complete" >> $GITHUB_STEP_SUMMARY + echo "### ✅ Image Built and Pushed" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "**Image:** \`${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.build-image.outputs.image_tag }}\`" >> $GITHUB_STEP_SUMMARY + echo "**Image:** \`${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.tag }}\`" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "FluxCD will automatically apply the changes to the cluster." >> $GITHUB_STEP_SUMMARY + echo "FluxCD will automatically detect and deploy the new image." >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "**Monitor deployment:**" >> $GITHUB_STEP_SUMMARY echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY