From 88d02c6256961ba60c15a39c108ab128f1f267c8 Mon Sep 17 00:00:00 2001 From: alexanderM91 Date: Thu, 17 Oct 2024 18:30:48 +0200 Subject: [PATCH] Notification + diff --- .github/workflows/ci.yml | 72 ++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e7a3eae..9807179f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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<> $GITHUB_ENV -# echo "$DIFF_OUTPUT" >> $GITHUB_ENV -# echo "EOF" >> $GITHUB_ENV -# -# - name: Send Slack Notification -# uses: slackapi/slack-github-action@v1.24.0 -# 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<> $GITHUB_ENV + echo "$DIFF_OUTPUT" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + + - name: Send Slack Notification + uses: slackapi/slack-github-action@v1.24.0 + 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