From aea072551d769f373bf7d1d85e8d273be88714c1 Mon Sep 17 00:00:00 2001 From: Jack Tracey Date: Thu, 14 Mar 2024 18:13:00 +0000 Subject: [PATCH 1/2] feat: Added workflow for syncing CSV labels to GitHub Labels --- ...avm.platform.sync-repo-labels-from-csv.yml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/avm.platform.sync-repo-labels-from-csv.yml diff --git a/.github/workflows/avm.platform.sync-repo-labels-from-csv.yml b/.github/workflows/avm.platform.sync-repo-labels-from-csv.yml new file mode 100644 index 0000000000..45a0d872d0 --- /dev/null +++ b/.github/workflows/avm.platform.sync-repo-labels-from-csv.yml @@ -0,0 +1,32 @@ +# 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 }} From 3e1d75d2800ef3cf7b13bd34004acba28d92a1fa Mon Sep 17 00:00:00 2001 From: Jack Tracey Date: Thu, 14 Mar 2024 18:17:52 +0000 Subject: [PATCH 2/2] tidy --- .github/workflows/avm.platform.sync-repo-labels-from-csv.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/avm.platform.sync-repo-labels-from-csv.yml b/.github/workflows/avm.platform.sync-repo-labels-from-csv.yml index 45a0d872d0..d33fb79970 100644 --- a/.github/workflows/avm.platform.sync-repo-labels-from-csv.yml +++ b/.github/workflows/avm.platform.sync-repo-labels-from-csv.yml @@ -23,7 +23,6 @@ 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"