Skip to content

Commit

Permalink
Updated files #3
Browse files Browse the repository at this point in the history
  • Loading branch information
StrahinjaJacimovic committed Sep 13, 2024
1 parent fd73e64 commit e31168a
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/notify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@ jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Checkout code
uses: actions/checkout@v4

- name: Build Message with Python
id: build_message
run: |
echo "MATTERMOST_MESSAGE=$(python -u $PWD/scripts/build_message.py)" >> $GITHUB_OUTPUT
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Send notification to Mattermost
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
run: |
curl -X POST -H 'Content-Type: application/json' \
--data '{"text": "'"${{ steps.build_message.outputs.MATTERMOST_MESSAGE }}"'"}' \
$MATTERMOST_WEBHOOK_URL
- name: Build Message with Python
id: build_message
run: |
echo "MATTERMOST_MESSAGE=$(python -u scripts/build_message.py)" >> $GITHUB_OUTPUT
- name: Send notification to Mattermost
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
run: |
curl -X POST -H 'Content-Type: application/json' \
--data '{"text": "'"${{ steps.build_message.outputs.MATTERMOST_MESSAGE }}"'"}' \
$MATTERMOST_WEBHOOK_URL

0 comments on commit e31168a

Please sign in to comment.