Update Repo Custom Properties #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Repo Custom Properties | |
description: Updates the repo custom properties as defined in the provided governance repo, repo-properties.yaml file. | |
on: | |
workflow_dispatch: | |
jobs: | |
update-properties: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: andrewb1269hg/update-custom-props@main | |
with: | |
governance-repo-url: 'https://github.com/org-andrewb1269hg/my-governance-repo.git' | |
- name: Call GitHub API to list variables | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OWNER: ${{ github.repository_owner }} | |
REPO: ${{ github.event.repository.name }} | |
run: | | |
echo "Fetching all repo-level variables..." | |
curl -s -H "Authorization: Bearer $GH_TOKEN" \ | |
-H "Accept: application/vnd.github+json" \ | |
"https://api.github.com/repos/$OWNER/$REPO/actions/variables" \ | |
| jq '.variables[] | "\(.name)=\(.value)"' |