From e98e11d963796baabb5325e83efaa2e939f340a8 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Tue, 16 Jul 2024 19:02:55 +0100 Subject: [PATCH] Add success flags to workflows --- .github/workflows/build-push-attest-docker.yml | 10 ++++++++++ .github/workflows/create-release.yml | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/build-push-attest-docker.yml b/.github/workflows/build-push-attest-docker.yml index 43ffc0c..75facb8 100644 --- a/.github/workflows/build-push-attest-docker.yml +++ b/.github/workflows/build-push-attest-docker.yml @@ -6,6 +6,10 @@ on: release: required: true type: string + outputs: + success: + description: "Did the flow succeed?" + value: ${{ jobs.publish.outputs.success }} jobs: publish: @@ -16,6 +20,8 @@ jobs: contents: read attestations: write id-token: write + outputs: + success: ${{ steps.set_flag.outputs.success }} steps: - name: Check out the repo uses: actions/checkout@v4 @@ -58,3 +64,7 @@ jobs: subject-name: ghcr.io/${{ github.repository }} subject-digest: ${{ steps.push.outputs.digest }} push-to-registry: true + + - name: Set success flag + id: set_flag + run: echo "success=true" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index b2e3cb0..ad67e43 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -5,6 +5,9 @@ on: release_name: description: "Name of the created release" value: ${{ jobs.create_release.outputs.release_name }} + success: + description: "Was the release created successfully?" + value: ${{ jobs.create_release.outputs.success }} jobs: create_release: @@ -12,6 +15,7 @@ jobs: runs-on: ubuntu-latest outputs: release_name: ${{ steps.tag_version.outputs.new_tag }} + success: ${{ steps.set_flag.outputs.success }} steps: - uses: actions/checkout@v4 with: @@ -41,3 +45,7 @@ jobs: name: ${{ steps.tag_version.outputs.new_tag }} body: ${{ steps.tag_version.outputs.changelog }} generateReleaseNotes: true + + - name: Set success flag + id: set_flag + run: echo "success=true" >> "$GITHUB_OUTPUT"