Skip to content

Commit 8508d47

Browse files
authored
Merge pull request #23 from per1234/sync-sync-labels-workflow
Sync "Sync Labels" workflow with upstream copy
2 parents 535abe1 + dc0e4b9 commit 8508d47

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/sync-labels.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/sync-labels.md
22
name: Sync Labels
33

4-
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
4+
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
55
on:
66
push:
77
paths:
@@ -24,6 +24,8 @@ env:
2424
jobs:
2525
check:
2626
runs-on: ubuntu-latest
27+
permissions:
28+
contents: read
2729

2830
steps:
2931
- name: Checkout repository
@@ -55,6 +57,7 @@ jobs:
5557
download:
5658
needs: check
5759
runs-on: ubuntu-latest
60+
permissions: {}
5861

5962
strategy:
6063
matrix:
@@ -72,20 +75,21 @@ jobs:
7275
- name: Pass configuration files to next job via workflow artifact
7376
uses: actions/upload-artifact@v4
7477
with:
75-
path: |
76-
*.yaml
77-
*.yml
78+
path: ${{ matrix.filename }}
7879
if-no-files-found: error
7980
name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}${{ matrix.filename }}
8081

8182
sync:
8283
needs: download
8384
runs-on: ubuntu-latest
85+
permissions:
86+
contents: read
87+
issues: write
8488

8589
steps:
8690
- name: Set environment variables
8791
run: |
88-
# See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
92+
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
8993
echo "MERGED_CONFIGURATION_PATH=${{ runner.temp }}/labels.yml" >> "$GITHUB_ENV"
9094
9195
- name: Determine whether to dry run
@@ -102,7 +106,7 @@ jobs:
102106
run: |
103107
# Use of this flag in the github-label-sync command will cause it to only check the validity of the
104108
# configuration.
105-
echo "::set-output name=flag::--dry-run"
109+
echo "flag=--dry-run" >> $GITHUB_OUTPUT
106110
107111
- name: Checkout repository
108112
uses: actions/checkout@v4

0 commit comments

Comments
 (0)