Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update release tag name on pre-releases #147

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ jobs:
run: |
make upload_manifests RELEASE_VERSION=$NRI_VERSION NRI_ECS_IMAGE_TAG=$DOCKER_IMAGE_TAG

- if: ${{ github.event.release.prerelease }}
uses: actions/checkout@v4
- if: ${{ github.event.release.prerelease }}
name: Update title for successful pre-release
env:
GH_TOKEN: "${{ secrets.COREINT_BOT_TOKEN }}"
run: |
gh release edit ${{ github.event.release.tag_name }} --title "${{ github.event.release.tag_name }}"
sigilioso marked this conversation as resolved.
Show resolved Hide resolved


notify-failure:
if: ${{ always() && failure() }}
needs: [release-image-manifest]
Expand All @@ -82,3 +92,22 @@ jobs:
slack-bot-user-oauth-access-token: ${{ secrets.COREINT_SLACK_TOKEN }}
slack-channel: ${{ secrets.COREINT_SLACK_CHANNEL }}
slack-text: "❌ `${{ env.ORIGINAL_REPO_NAME }}`: [image release failed](${{ github.server_url }}/${{ env.ORIGINAL_REPO_NAME }}/actions/runs/${{ github.run_id }})."

update-title-on-failure:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need the same for release pipeline?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it makes total sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just updated it here: e2ecfab.

I also considered using a GITHUB_ENV variable to compose the tittle but, I'm not sure if that would have been more complex. Let me know your thoughts.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is clear enough like this, it is just few lines below, therefore I think it is ok without jumping from one side to the other

if: ${{ always() && failure() }}
needs: [release-image-manifest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- if: ${{ github.event.release.prerelease }}
name: Reflect failure in pre-release title
env:
GH_TOKEN: "${{ secrets.COREINT_BOT_TOKEN }}"
run: |
gh release edit ${{ github.event.release.tag_name }} --title "${{ github.event.release.tag_name }} (pre-release-failure)"
- if: ${{ ! github.event.release.prerelease }}
name: Reflect failure in release title
env:
GH_TOKEN: "${{ secrets.COREINT_BOT_TOKEN }}"
run: |
gh release edit ${{ github.event.release.tag_name }} --title "${{ github.event.release.tag_name }} (release-failure)"
Loading