Skip to content

Commit df24db7

Browse files
committed
Tweak fledge workflow
1 parent ab90a77 commit df24db7

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/fledge.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: fledge
33
on:
44
# for manual triggers
55
workflow_dispatch:
6-
# for debugging
7-
push:
8-
paths:
9-
- .github/workflows/fledge.yaml
106
# daily run
117
schedule:
128
- cron: "30 0 * * *"
@@ -16,8 +12,20 @@ concurrency:
1612
cancel-in-progress: true
1713

1814
jobs:
15+
check_fork:
16+
runs-on: ubuntu-latest
17+
outputs:
18+
is_forked: ${{ steps.check.outputs.is_forked }}
19+
steps:
20+
- name: Check if the repo is forked
21+
id: check
22+
run: |
23+
echo "is_forked=$(curl -s -H "Accept: application/vnd.github+json" -H 'Authorization: Bearer ${{ github.token }}' -H "X-GitHub-Api-Version: 2022-11-28" ${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY} | jq .fork)" >> $GITHUB_OUTPUT
24+
1925
fledge:
2026
runs-on: ubuntu-latest
27+
needs: check_fork
28+
if: needs.check_fork.outputs.is_forked == 'false'
2129
permissions:
2230
contents: write
2331
env:

0 commit comments

Comments
 (0)