Skip to content

Commit 299a9dc

Browse files
committed
add access to org name file
Signed-off-by: Andrew Brandt <[email protected]>
1 parent be8c9e8 commit 299a9dc

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

action.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ runs:
4141
sudo chmod +x /usr/bin/yq
4242
yq --version # confirm installed
4343
44+
- name: List all repos in org
45+
shell: bash
46+
env:
47+
GH_TOKEN: ${{ inputs.token }}
48+
run: |
49+
ORG_NAME=$(echo "$GITHUB_REPOSITORY" | cut -d'/' -f1)
50+
echo "Org name is: ${ORG_NAME}"
51+
echo "${ORG_NAME}" > org-name.txt
52+
echo "Fetching repos for organization: ${{ inputs.org }}"
53+
gh api --paginate "orgs/$ORG_NAME/repos" --jq '.[].name' > repo-list.txt
54+
echo "Repos written to repo-list.txt"
55+
4456
- name: Extract property names into a JSON array
4557
shell: bash
4658
env:
@@ -54,18 +66,6 @@ runs:
5466
5567
echo "Property names written to property-names.json"
5668
57-
- name: List all repos in org
58-
shell: bash
59-
env:
60-
GH_TOKEN: ${{ inputs.token }}
61-
run: |
62-
ORG_NAME=$(echo "$GITHUB_REPOSITORY" | cut -d'/' -f1)
63-
echo "Org name is: ${ORG_NAME}"
64-
echo "${ORG_NAME}" > org-name.txt
65-
echo "Fetching repos for organization: ${{ inputs.org }}"
66-
gh api --paginate "orgs/$ORG_NAME/repos" --jq '.[].name' > repo-list.txt
67-
echo "Repos written to repo-list.txt"
68-
6969
- name: Print out all repos in file
7070
shell: bash
7171
run: |

0 commit comments

Comments
 (0)