We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
gh repo fork
1 parent 8637354 commit df5bad0Copy full SHA for df5bad0
prepare-release/action.yml
@@ -68,7 +68,15 @@ runs:
68
- name: Create Fork
69
# no-op if the repository is already forked
70
shell: bash
71
- 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
72
+ # see: https://github.com/cli/cli/issues/10079
73
+ run: |
74
+ echo FORK=$(gh api \
75
+ -X POST \
76
+ -H "Accept: application/vnd.github+json" \
77
+ "/repos/${{ github.repository }}/forks" \
78
+ -f default_branch_only=true \
79
+ --jq ".full_name") >> $GITHUB_ENV
80
env:
81
GH_TOKEN: ${{ inputs.fork-token }}
82
0 commit comments