Skip to content

Commit cd10cab

Browse files
authored
chore(gh): update workflows (#265)
- Sets the default permissions for workflows. - Renames and updates the lock workflow to include discussions scope. - Updates `.gitignore`. Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
1 parent 3e0aaab commit cd10cab

7 files changed

Lines changed: 34 additions & 10 deletions

File tree

.github/workflows/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ name: Publish Documentation
44
on:
55
workflow_dispatch:
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
publish-docs:
912
runs-on: ubuntu-latest

.github/workflows/issues.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
types:
77
- opened
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
label-issues:
1114
runs-on: ubuntu-latest
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
---
2-
name: Lock Threads
2+
name: Lock
33

44
on:
55
schedule:
66
- cron: 30 00 * * *
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
lock:
1013
runs-on: ubuntu-latest
1114
permissions:
1215
issues: write
1316
pull-requests: write
17+
discussions: write
1418
steps:
1519
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1
1620
with:
17-
github-token: ${{ secrets.GITHUB_TOKEN }}
18-
issue-comment: >
21+
github-token: "${{ secrets.GITHUB_TOKEN }}"
22+
issue-comment: >-
1923
I'm going to lock this issue because it has been closed for 30
2024
days. This helps our maintainers find and focus on the active
2125
issues.
@@ -24,8 +28,8 @@ jobs:
2428
If you have found a problem that seems similar to this,
2529
please open a new issue and complete the issue template so we can
2630
capture all the details necessary to investigate further.
27-
issue-inactive-days: 30
28-
pr-comment: >
31+
issue-inactive-days: "30"
32+
pr-comment: >-
2933
I'm going to lock this pull request because it has been closed for
3034
30 days. This helps our maintainers find and focus on the active
3135
issues.
@@ -34,4 +38,4 @@ jobs:
3438
If you have found a problem that seems related to this
3539
change, please open a new issue and complete the issue template so
3640
we can capture all the details necessary to investigate further.
37-
pr-inactive-days: 30
41+
pr-inactive-days: "30"

.github/workflows/pull-requests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
- edited
1313
- ready_for_review
1414

15+
permissions:
16+
contents: read
17+
1518
jobs:
1619
labeler:
1720
name: Labeler

.github/workflows/stale.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
schedule:
66
- cron: 00 00 * * *
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
stale:
1013
runs-on: ubuntu-latest

.github/workflows/tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- "**.psd1"
1010
workflow_dispatch:
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
basic_tests:
1417
runs-on: ubuntu-latest

.gitignore

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# MacOS
2-
## Ignore desktop services files.
1+
# Ignore editor directories.
2+
.idea/
3+
.vscode/
4+
5+
# Ignore temporary editor files.
6+
*~
7+
8+
# Ignore macOS desktop services store files.
39
**/.DS_Store
410

5-
# MkDocs
6-
## Ignore site directory.
11+
## Ignore MkDocs site directory.
712
**/.site/**

0 commit comments

Comments
 (0)