Skip to content

Commit

Permalink
slack message
Browse files Browse the repository at this point in the history
  • Loading branch information
ryannikolaidis committed Sep 14, 2023
1 parent dd22a96 commit b239cb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release-version-alert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Generate Message Hash
id: generate-hash
run: |
MESSAGE_HASH=$(echo "${MESSAGE}" | sha256sum | cut -d ' ' -f1)
MESSAGE_HASH=$(echo "${env.SLACK_MESSAGE}" | sha256sum | cut -d ' ' -f1)
echo "MESSAGE_HASH=$MESSAGE_HASH" >> $GITHUB_ENV
- name: Retrieve Messages from Cache
Expand All @@ -49,15 +49,15 @@ jobs:
- name: Check for Duplicates
run: |
DUPLICATE_CHECK=$(grep -Fx "${MESSAGE}" $HOME/messages_cache.txt || true)
DUPLICATE_CHECK=$(grep -Fx "${env.SLACK_MESSAGE}" $HOME/messages_cache.txt || true)
if [ -n "$DUPLICATE_CHECK" ]; then
echo "Message already posted. Skipping duplicate Slack notification."
exit 0 # Exit without posting a message
fi
- name: Write Message to Cache File
run: |
echo "${MESSAGE}" >> $HOME/messages_cache.txt
echo "${env.SLACK_MESSAGE}" >> $HOME/messages_cache.txt
- name: Store Messages in Cache
uses: actions/cache@v2
Expand Down

0 comments on commit b239cb9

Please sign in to comment.