Skip to content

Update Repo Custom Properties #1

Update Repo Custom Properties

Update Repo Custom Properties #1

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)"'