Files
ivuorinen/.github/workflows/sync-labels-to-own-projects.yml
Ismo Vuorinen 91d4b77888 chore(deps): pin GitHub Actions and add npm dev dependencies
Pin GitHub Actions to specific SHA versions across all workflows and
add @ivuorinen/commitlint-config and @ivuorinen/prettier-config
packages. Add .yamllint config with relaxed rules for GitHub Actions
workflows and fix YAML lint issues (long lines, blank lines).
2026-03-02 03:29:42 +02:00

53 lines
1.4 KiB
YAML

---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Sync labels to other repositories
on:
push:
branches:
- main
paths:
- .github/labels.yml
- .github/workflows/sync-labels-to-own-projects.yml
workflow_dispatch:
workflow_call:
schedule:
- cron: '0 0 * * *' # Every day at midnight
jobs:
sync-labels:
runs-on: ubuntu-latest
permissions:
contents: write
statuses: write
outputs:
repos: ${{ steps.repos.outputs.REPOS }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get Repositories
id: repos
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
REPOS="$(
gh repo list ivuorinen \
--no-archived \
--source \
--limit 25 \
--json nameWithOwner -q '.[] | .nameWithOwner' \
| sed 's|\"||'
)"
EOF="$(dd if=/dev/urandom bs=15 count=1 status=none | base64)"
{
echo "REPOS<<$EOF"
echo "$REPOS"
echo "$EOF"
} >> "$GITHUB_ENV"
- uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0
with:
prune: true
repository: ${{ steps.repos.outputs.REPOS }}
token: ${{ secrets.PERSONAL_TOKEN }}