diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 78e8225..0d584c9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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