Skip to content

Commit

Permalink
Workaround for gh repo fork
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodegard committed Dec 13, 2024
1 parent 8637354 commit df5bad0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion prepare-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,15 @@ runs:
- name: Create Fork
# no-op if the repository is already forked
shell: bash
run: echo FORK=$(gh repo fork --clone=false --remote=false --default-branch-only 2>&1 | awk '{print $1}') >> $GITHUB_ENV
# don't use `gh repo fork` since it doesn't provide consistent output
# see: https://github.com/cli/cli/issues/10079
run: |
echo FORK=$(gh api \
-X POST \
-H "Accept: application/vnd.github+json" \
"/repos/${{ github.repository }}/forks" \
-f default_branch_only=true \
--jq ".full_name") >> $GITHUB_ENV
env:
GH_TOKEN: ${{ inputs.fork-token }}

Expand Down

0 comments on commit df5bad0

Please sign in to comment.