Skip to content

Commit

Permalink
improved CI/CD with success and fail messages
Browse files Browse the repository at this point in the history
  • Loading branch information
NivEz committed Mar 3, 2024
1 parent 9859fde commit 537c8d1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/deploy-on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: exit
run: exit 1

- name: Set environment variables
uses: allenevans/set-env@v3.0.0
with:
Expand Down Expand Up @@ -84,15 +87,23 @@ jobs:
- name: Helm upgrade
run: helm upgrade -f .helm/values.yaml movie-info-bot ./.helm --atomic --reuse-values --namespace movie-info-bot

success-message:
runs-on: ubuntu-latest
needs: deploy
steps:
- name: Success message
uses: NivEz/interactive-inputs-action@v1
with:
telegram-api-token: ${{ secrets.TELEGRAM_API_TOKEN }}
telegram-chat-id: ${{ secrets.TELEGRAM_CHAT_ID }}
simple-message: 'Successfully deployed a new version of movie-info-bot ✅'

failure-message:
runs-on: ubuntu-latest
if: failure()
needs: deploy
steps:
- name: Failure message
if: failure()
uses: NivEz/interactive-inputs-action@v1
with:
telegram-api-token: ${{ secrets.TELEGRAM_API_TOKEN }}
Expand Down

0 comments on commit 537c8d1

Please sign in to comment.