Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added workflow for syncing CSV labels to GitHub Labels #1285

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/avm.platform.sync-repo-labels-from-csv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Workflow for syncing CSV labels to GitHub Labels
name: avm.platform.sync-repo-labels-from-csv

on:
schedule:
- cron: 45 11 * * * # Run daily at 3:45 AM PST
workflow_dispatch: {}

# Allow one concurrent deployment
concurrency:
group: "labels"
cancel-in-progress: true

permissions:
issues: write
pull-requests: write

defaults:
run:
shell: pwsh

jobs:
sync-labels:
runs-on: ubuntu-latest
steps:
- name: Sync AVM Labels To Repos GitHub Labels
run: |
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Azure/Azure-Verified-Modules/main/docs/static/scripts/Set-AvmGitHubLabels.ps1" -OutFile "./Set-AvmGitHubLabels.ps1"
./Set-AvmGitHubLabels.ps1 -RepositoryName "${{ github.repository }}" -CreateCsvLabelExports $false -RemoveExistingLabels $false -NoUserPrompts $true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}