diff --git a/.github/workflows/merge.yaml b/.github/workflows/deploy-dev.yml similarity index 83% rename from .github/workflows/merge.yaml rename to .github/workflows/deploy-dev.yml index 113a8b8..98f0f18 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/deploy-dev.yml @@ -1,4 +1,4 @@ -name: Merge +name: Deploy Dev on: push: @@ -101,3 +101,19 @@ jobs: git config user.email "github-actions[bot]@users.noreply.github.com" git add serving-api/dev/ git diff --staged --quiet && echo "No changes to deploy" || (git commit -m "deploy serving-api ${{ github.sha }}" && git push) + + notify: + name: Slack Notification + runs-on: ubuntu-latest + needs: [changes, docker-backend, docker-frontend, deploy] + if: always() + steps: + - name: Notify Slack + uses: slackapi/slack-github-action@v2 + with: + webhook-type: incoming-webhook + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + payload: | + { + "text": "${{ github.repository }} Deploy Dev — ${{ contains(needs.*.result, 'failure') && 'FAILED' || 'deployed' }}\nCommit: ${{ github.sha }}\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View run>" + } diff --git a/.github/workflows/release.yaml b/.github/workflows/deploy-prod.yml similarity index 81% rename from .github/workflows/release.yaml rename to .github/workflows/deploy-prod.yml index 22c4a51..ca21a6f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/deploy-prod.yml @@ -1,4 +1,4 @@ -name: Release +name: Deploy Prod on: release: @@ -87,3 +87,19 @@ jobs: git config user.email "github-actions[bot]@users.noreply.github.com" git add serving-api/prod/ git diff --staged --quiet && echo "No changes to deploy" || (git commit -m "release serving-api ${{ github.event.release.tag_name }}" && git push) + + notify: + name: Slack Notification + runs-on: ubuntu-latest + needs: [validate-tag, docker-backend, docker-frontend, deploy] + if: always() + steps: + - name: Notify Slack + uses: slackapi/slack-github-action@v2 + with: + webhook-type: incoming-webhook + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + payload: | + { + "text": "${{ github.repository }} Release — ${{ contains(needs.*.result, 'failure') && 'FAILED' || 'published' }}\nTag: ${{ github.event.release.tag_name }}\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View run>" + } diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yml similarity index 100% rename from .github/workflows/pr.yaml rename to .github/workflows/pr.yml