mirror of
https://github.com/slsa-framework/slsa-verifier.git
synced 2026-05-20 07:22:47 +00:00
chore: report scheduled release workflow failures (#543)
* chore: report scheduled release workflow failures Signed-off-by: Asra Ali <asraa@google.com> * fix: fix yamllint Signed-off-by: Asra Ali <asraa@google.com> * empty commit Signed-off-by: Asra Ali <asraa@google.com> --------- Signed-off-by: Asra Ali <asraa@google.com> Co-authored-by: laurentsimon <64505099+laurentsimon@users.noreply.github.com>
This commit is contained in:
32
.github/workflows/release.yml
vendored
32
.github/workflows/release.yml
vendored
@@ -15,6 +15,8 @@ permissions: read-all
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ISSUE_REPOSITORY: slsa-framework/slsa-verifier
|
||||
# In case daily runs fail, the label for filing the issue
|
||||
HEADER: release
|
||||
|
||||
jobs:
|
||||
# Generate ldflags dynamically.
|
||||
@@ -57,6 +59,7 @@ jobs:
|
||||
verification:
|
||||
needs: [builder]
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name != 'schedule'
|
||||
permissions: read-all
|
||||
steps:
|
||||
- name: Install the verifier
|
||||
@@ -85,3 +88,32 @@ jobs:
|
||||
--source-uri "github.com/$GITHUB_REPOSITORY" \
|
||||
--source-tag "$GITHUB_REF_NAME" \
|
||||
"$ARTIFACT"
|
||||
|
||||
if-succeed:
|
||||
needs: [args, builder]
|
||||
runs-on: ubuntu-latest
|
||||
# We use `== 'failure'` instead of ` != 'success'` because we want to ignore skipped jobs, if there are any.
|
||||
if: github.event_name == 'schedule' && needs.args.result != 'failure' && needs.builder.result != 'failure'
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
steps:
|
||||
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
|
||||
with:
|
||||
repository: slsa-framework/example-package
|
||||
ref: main
|
||||
- run: ./.github/workflows/scripts/e2e-report-success.sh
|
||||
|
||||
if-failed:
|
||||
needs: [args, builder]
|
||||
runs-on: ubuntu-latest
|
||||
if: always() && github.event_name == 'schedule' && (needs.args.result == 'failure' || needs.builder.result == 'failure')
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
steps:
|
||||
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
|
||||
with:
|
||||
repository: slsa-framework/example-package
|
||||
ref: main
|
||||
- run: ./.github/workflows/scripts/e2e-report-failure.sh
|
||||
|
||||
Reference in New Issue
Block a user