Skip to content

Commit

Permalink
Fix notify job
Browse files Browse the repository at this point in the history
  • Loading branch information
bloodyowl committed Oct 26, 2023
1 parent 8af0d4c commit 3308411
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/prerelease-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Read version
id: version
shell: bash
run: echo "version=${RELEASE_TAG#*preprod-}" >> $GITHUB_OUTPUT
env:
RELEASE_TAG: ${{ github.event.client_payload.imageTag }}

- name: Cache release tag
id: cache-release-tag
uses: actions/cache@v3
Expand Down Expand Up @@ -44,14 +51,6 @@ jobs:
GITHUB_TOKEN: $${{ secrets.NOTIFY_GH_TOKEN }}
RELEASE_TAG: ${{ github.event.client_payload.imageTag }}

- name: Get version
if: ${{ steps.cache-release-tag.outputs.cache-hit != 'true' }}
id: version
shell: bash
run: echo "version=${RELEASE_TAG#*preprod-}" >> $GITHUB_OUTPUT
env:
RELEASE_TAG: ${{ github.event.client_payload.imageTag }}

- name: Notify on Slack
if: ${{ startsWith(github.event.client_payload.imageTag, 'preprod-') && steps.cache-release-tag.outputs.cache-hit != 'true' }}
uses: bloodyowl/[email protected]
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/release-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Read version
id: version
shell: bash
run: echo "version=${RELEASE_TAG#*prod-}" >> $GITHUB_OUTPUT
env:
RELEASE_TAG: ${{ github.event.client_payload.imageTag }}

- name: Cache release tag
id: cache-release-tag
uses: actions/cache@v3
Expand Down Expand Up @@ -44,14 +51,6 @@ jobs:
GITHUB_TOKEN: $${{ secrets.NOTIFY_GH_TOKEN }}
RELEASE_TAG: ${{ github.event.client_payload.imageTag }}

- name: Get version
if: ${{ steps.cache-release-tag.outputs.cache-hit != 'true' }}
id: version
shell: bash
run: echo "version=${RELEASE_TAG#*prod-}" >> $GITHUB_OUTPUT
env:
RELEASE_TAG: ${{ github.event.client_payload.imageTag }}

- name: Notify on Slack
if: ${{ startsWith(github.event.client_payload.imageTag, 'prod-') && steps.cache-release-tag.outputs.cache-hit != 'true' }}
uses: bloodyowl/[email protected]
Expand Down

0 comments on commit 3308411

Please sign in to comment.