From cafdeb538061d109c1e43ffd6d4a3fee1c67139f Mon Sep 17 00:00:00 2001 From: hadar-co Date: Thu, 5 Oct 2023 13:08:54 +0300 Subject: [PATCH] Update portCreateRepo.yaml --- .github/workflows/portCreateRepo.yaml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/portCreateRepo.yaml b/.github/workflows/portCreateRepo.yaml index 4811c7f..f904ef3 100644 --- a/.github/workflows/portCreateRepo.yaml +++ b/.github/workflows/portCreateRepo.yaml @@ -15,11 +15,19 @@ jobs: runs-on: ubuntu-latest name: Creating Organization Repository steps: - - name: Create Repository - env: - GH_TOKEN: ${{ secrets.ORG_ADMIN_TOKEN }} # Replace with your secret's name - run: | + - name: create repo + uses: octobay/create-repository-action@v1 + with: + name: '${{ inputs.name }}' + org: '${{ github.repository_owner }}' + access-token: '${{ secrets.ORG_ADMIN_TOKEN }}' + private-repo: true + initalize-repo: true + #- name: Create Repository + # env: + # GH_TOKEN: ${{ secrets.ORG_ADMIN_TOKEN }} # Replace with your secret's name + #run: | # Create a repository using the GitHub REST API - org_name="port-samples" - repo_name="${{ inputs.name }}" - curl -X POST -H "Authorization: token $GH_TOKEN" "https://api.github.com/orgs/$org_name/repos" -d "{\"name\":\"$repo_name\",\"private\":false}" + # org_name="port-samples" + #repo_name="${{ inputs.name }}" + #curl -X POST -H "Authorization: token $GH_TOKEN" "https://api.github.com/orgs/$org_name/repos" -d "{\"name\":\"$repo_name\",\"private\":false}"