I am trying to create repo using GitHub CLI on a GitHub Action and it stuck on
GraphQL: Resource not accessible by integration (createRepository)
Here is the action.yaml
name: Create Repo
on:
push:
branches: [ master ]
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TEMPLATE_REPO: template # this is the template directory
jobs:
build:
name: Create Repo
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Repo Create
run: |
git -C ${{ env.TEMPLATE_REPO }} init
gh repo create repo-test --private --source=${{ env.TEMPLATE_REPO }}
Here is the error I am getting. What permission I need to provide. I am ORG admin
Initialized empty Git repository in /home/runner/work/repo-central/repo-central/template/.git/
GraphQL: Resource not accessible by integration (createRepository)
Error: Process completed with exit code 1.