Skip to content

Schedule cli

Schedule cli #7

name: Schedule cli
on:
workflow_run:
workflows: ["Pre submits cli"]
types: [completed]
branches: [main]
permissions: read-all
env:
GH_TOKEN: ${{ github.token }}
ISSUE_REPOSITORY: ${{ github.repository }}
jobs:
if-failed:
runs-on: ubuntu-latest
# See https://github.com/orgs/community/discussions/26238.
steps:
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: event_name
- name: Check event name
id: name
run: |
name=$(cat ./event_name.txt)
ctned="false"
if [[ "$name" == "schedule" ]] || [[ "$name" == "workflow_dispatch" ]]; then
ctned="true"
fi
echo "continue=$ctned" >> $GITHUB_OUTPUT
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
if: steps.name.outputs.continue == 'true'
with:
ref: main
repository: slsa-framework/example-package
- run: ./.github/workflows/scripts/e2e-report-failure.sh
if: steps.name.outputs.continue == 'true' && github.event.workflow_run.conclusion != 'success'
- run: ./.github/workflows/scripts/e2e-report-success.sh
if: steps.name.outputs.continue == 'true' && github.event.workflow_run.conclusion == 'success'