.github: avoid spurious CI failures in forks

This spams my email every day.
reviewable/pr1338/r1
Tamir Duberstein 5 days ago
parent 53ec616411
commit 222b2cb88f
No known key found for this signature in database

@ -41,14 +41,15 @@ jobs:
- run: ./clippy.sh
# On the `aya-rs/aya` repository, regenerate the public API on a schedule.
#
# On all other events and repositories assert the public API is up to date.
- run: cargo xtask public-api
if: github.event_name != 'schedule'
if: ${{ !(github.event_name == 'schedule' && github.repository == 'aya-rs/aya') }}
- run: cargo xtask public-api --bless
if: github.event_name == 'schedule'
if: ${{ (github.event_name == 'schedule' && github.repository == 'aya-rs/aya') }}
- uses: peter-evans/create-pull-request@v7
if: github.event_name == 'schedule'
if: ${{ (github.event_name == 'schedule' && github.repository == 'aya-rs/aya') }}
with:
# GitHub actions aren't allowed to trigger other actions to prevent
# abuse; the canonical workaround is to use a sufficiently authorized

@ -2,7 +2,8 @@ name: codegen
on:
push:
branches-ignore: 'create-pull-request/**'
branches-ignore:
- 'create-pull-request/**'
schedule:
- cron: 00 4 * * *
@ -40,6 +41,7 @@ jobs:
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- uses: peter-evans/create-pull-request@v7
if: ${{ github.repository == 'aya-rs/aya' }}
with:
# GitHub actions aren't allowed to trigger other actions to prevent
# abuse; the canonical workaround is to use a sufficiently authorized

Loading…
Cancel
Save