diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 83af206..c1f748d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }}" + + notify-failure: if: ${{ always() && failure() }} needs: [release-image-manifest] @@ -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: + 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)"