Skip to content

Commit

Permalink
Update portCreateRepo.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
hadar-co authored Oct 5, 2023
1 parent edc6822 commit cafdeb5
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/portCreateRepo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

0 comments on commit cafdeb5

Please sign in to comment.