GH Actions Cron Schedule #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GH Actions Cron Schedule | |
on: | |
workflow_dispatch: | |
schedule: | |
# Every M-F at 12:00am run this job | |
- cron: "0 0 * * 1-5" | |
jobs: | |
release-next: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Configure upstream | |
run: | | |
git remote add upstream https://github.com/sigstore/rekor | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions Bot" | |
- name: Check for existing pull request | |
run: | | |
openPRs="$(gh pr list --state open -H release-next-ci --json number | jq -r '.[].number' | wc -l)" | |
echo 'NUM_OPEN_PRS='$openPRs >> $GITHUB_ENV | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run update script | |
run: | | |
./redhat/release/update-to-head.sh | |
if: ${{ env.NUM_OPEN_PRS == 0 }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
check-image-version: | |
uses: securesign/actions/.github/workflows/check-image-version.yaml@main | |
strategy: | |
matrix: | |
branch: [main, redhat-v1.3] | |
with: | |
branch: ${{ matrix.branch }} | |
secrets: | |
token: ${{ secrets.GITHUB_TOKEN }} |