Skip to content

Commit

Permalink
Tweak fledge workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Feb 16, 2023
1 parent 6801440 commit 38b3f5e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/fledge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: fledge
on:
# for manual triggers
workflow_dispatch:
# for debugging
push:
paths:
- .github/workflows/fledge.yaml
# daily run
schedule:
- cron: "30 0 * * *"
Expand All @@ -16,8 +12,20 @@ concurrency:
cancel-in-progress: true

jobs:
check_fork:
runs-on: ubuntu-latest
outputs:
is_forked: ${{ steps.check.outputs.is_forked }}
steps:
- name: Check if the repo is forked
id: check
run: |
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
fledge:
runs-on: ubuntu-latest
needs: check_fork
if: needs.check_fork.outputs.is_forked == 'false'
permissions:
contents: write
env:
Expand Down

0 comments on commit 38b3f5e

Please sign in to comment.