Skip to content

Commit

Permalink
Notification + diff
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderM91 committed Oct 17, 2024
1 parent cd3c6f4 commit 88d02c6
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,39 +105,39 @@ jobs:
echo "$DIFF_OUTPUT" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
# - name: Compare images and capture diff
# run: |
# CURRENT_TAG=${{ matrix.tags[0] }}
# PREVIOUS_TAG="${{ matrix.tags[0] }}-${{ env.PREV_COMMIT_HASH }}"
# bash .github/compare-images.sh $CURRENT_TAG $PREVIOUS_TAG > image-diff.txt || true
#
# - name: Read diff output
# id: read_diff
# run: |
# DIFF_OUTPUT=$(cat image-diff.txt)
# echo "DIFF_OUTPUT<<EOF" >> $GITHUB_ENV
# echo "$DIFF_OUTPUT" >> $GITHUB_ENV
# echo "EOF" >> $GITHUB_ENV
#
# - name: Send Slack Notification
# uses: slackapi/[email protected]
# with:
# payload: |
# {
# "attachments": [
# {
# "pretext": "Release changes for *spryker/php:${{ matrix.tags[0] }}*",
# "color": "good",
# "fields": [
# {
# "title": "Image diff:",
# "value": "${{ env.DIFF_OUTPUT }}",
# "short": false
# }
# ]
# }
# ]
# }
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Compare images and capture diff
run: |
CURRENT_TAG=${{ matrix.tags[0] }}
PREVIOUS_TAG="${{ matrix.tags[0] }}-${{ env.PREV_COMMIT_HASH }}"
bash .github/compare-images.sh $CURRENT_TAG $PREVIOUS_TAG > image-diff.txt || true
- name: Read diff output
id: read_diff
run: |
DIFF_OUTPUT=$(cat image-diff.txt)
echo "DIFF_OUTPUT<<EOF" >> $GITHUB_ENV
echo "$DIFF_OUTPUT" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Send Slack Notification
uses: slackapi/[email protected]
with:
payload: |
{
"attachments": [
{
"pretext": "Release changes for *spryker/php:${{ matrix.tags[0] }}*",
"color": "good",
"fields": [
{
"title": "Image diff:",
"value": "${{ env.DIFF_OUTPUT }}",
"short": false
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

0 comments on commit 88d02c6

Please sign in to comment.