Skip to content

Commit a038cc1

Browse files
chore: update global workflows (#4725)
Co-authored-by: ReenigneArcher <[email protected]>
1 parent d7ac57c commit a038cc1

13 files changed

+48
-32
lines changed

.github/workflows/_codeql.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,13 @@
44
# the above-mentioned repo.
55

66
name: CodeQL
7-
permissions:
8-
actions: read
9-
contents: read
10-
security-events: write
7+
permissions: {}
118

129
on:
10+
pull_request:
1311
push:
1412
branches:
1513
- master
16-
pull_request:
1714
schedule:
1815
- cron: '00 12 * * 0' # every Sunday at 12:00 UTC
1916

@@ -26,3 +23,7 @@ jobs:
2623
name: CodeQL
2724
uses: LizardByte/.github/.github/workflows/__call-codeql.yml@master
2825
if: ${{ github.repository != 'LizardByte/.github' }}
26+
permissions:
27+
actions: read
28+
contents: read
29+
security-events: write

.github/workflows/_common-lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
# the above-mentioned repo.
55

66
name: common lint
7-
permissions:
8-
contents: read
7+
permissions: {}
98

109
on:
1110
pull_request:
@@ -19,3 +18,5 @@ jobs:
1918
name: Common Lint
2019
uses: LizardByte/.github/.github/workflows/__call-common-lint.yml@master
2120
if: ${{ github.repository != 'LizardByte/.github' }}
21+
permissions:
22+
contents: read

.github/workflows/_release-notifier.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
# Create a blog post for a new release and open a PR to the blog repo
77

88
name: Release Notifications
9-
permissions:
10-
contents: read
9+
permissions: {}
1110

1211
on:
1312
release:
@@ -19,7 +18,10 @@ jobs:
1918
name: Update blog
2019
uses: LizardByte/.github/.github/workflows/__call-release-notifier.yml@master
2120
if: github.repository_owner == 'LizardByte'
21+
permissions:
22+
contents: read
23+
with:
24+
gh_name: ${{ vars.GH_BOT_NAME }}
2225
secrets:
2326
GH_EMAIL: ${{ secrets.GH_BOT_EMAIL }}
24-
GH_NAME: ${{ secrets.GH_BOT_NAME }}
2527
GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }}

.github/workflows/_update-changelog.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
# the above-mentioned repo.
55

66
name: Update changelog
7-
permissions:
8-
contents: read
7+
permissions: {}
98

109
on:
1110
release:
@@ -27,5 +26,7 @@ jobs:
2726
github.repository_owner == 'LizardByte' &&
2827
(github.event_name == 'workflow_dispatch' ||
2928
(!github.event.release.prerelease && !github.event.release.draft))
29+
permissions:
30+
contents: read
3031
secrets:
3132
GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }}

.github/workflows/_update-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
name: Update docs
2929
uses: LizardByte/.github/.github/workflows/__call-update-docs.yml@master
3030
if: github.repository_owner == 'LizardByte'
31+
permissions: {}
3132
with:
3233
readthedocs_slug: ${{ vars.READTHEDOCS_SLUG }}
3334
secrets:

.github/workflows/_update-flathub-repo.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
# Update Flathub on release events.
99

1010
name: Update Flathub repo
11-
permissions:
12-
contents: read
11+
permissions: {}
1312

1413
on:
1514
release:
@@ -25,7 +24,10 @@ jobs:
2524
name: Update Flathub Repo
2625
uses: LizardByte/.github/.github/workflows/__call-update-flathub-repo.yml@master
2726
if: github.repository_owner == 'LizardByte'
27+
permissions:
28+
contents: read
29+
with:
30+
gh_name: ${{ vars.GH_BOT_NAME }}
2831
secrets:
2932
GH_EMAIL: ${{ secrets.GH_BOT_EMAIL }}
30-
GH_NAME: ${{ secrets.GH_BOT_NAME }}
3133
GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }}

.github/workflows/_update-homebrew-repo.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
# Update Homebrew on release events.
99

1010
name: Update Homebrew repo
11-
permissions:
12-
contents: read
11+
permissions: {}
1312

1413
on:
1514
release:
@@ -25,7 +24,10 @@ jobs:
2524
name: Update Homebrew repo
2625
uses: LizardByte/.github/.github/workflows/__call-update-homebrew-repo.yml@master
2726
if: github.repository_owner == 'LizardByte'
27+
permissions:
28+
contents: read
29+
with:
30+
gh_username: ${{ vars.GH_BOT_NAME }}
2831
secrets:
2932
GH_EMAIL: ${{ secrets.GH_BOT_EMAIL }}
30-
GH_USERNAME: ${{ secrets.GH_BOT_NAME }}
3133
GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }}

.github/workflows/_update-pacman-repo.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
# Update pacman repo on release events.
99

1010
name: Update pacman repo
11-
permissions:
12-
contents: read
11+
permissions: {}
1312

1413
on:
1514
release:
@@ -25,7 +24,10 @@ jobs:
2524
name: Update pacman repo
2625
uses: LizardByte/.github/.github/workflows/__call-update-pacman-repo.yml@master
2726
if: github.repository_owner == 'LizardByte'
27+
permissions:
28+
contents: read
29+
with:
30+
gh_name: ${{ vars.GH_BOT_NAME }}
2831
secrets:
2932
GH_EMAIL: ${{ secrets.GH_BOT_EMAIL }}
30-
GH_NAME: ${{ secrets.GH_BOT_NAME }}
3133
GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }}

.github/workflows/_update-winget-repo.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
# Update Winget on release events.
99

1010
name: Update Winget repo
11-
permissions:
12-
contents: read
11+
permissions: {}
1312

1413
on:
1514
release:
@@ -25,5 +24,9 @@ jobs:
2524
name: Update Winget repo
2625
uses: LizardByte/.github/.github/workflows/__call-update-winget-repo.yml@master
2726
if: github.repository_owner == 'LizardByte'
27+
permissions:
28+
contents: read
29+
with:
30+
gh_name: ${{ vars.GH_BOT_NAME }}
2831
secrets:
2932
GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }}

.github/workflows/ci-homebrew.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ permissions: {}
55
on:
66
workflow_call:
77
inputs:
8+
git_username:
9+
required: true
10+
type: string
811
publish_release:
912
required: true
1013
type: string
@@ -22,8 +25,6 @@ on:
2225
required: true
2326
GIT_EMAIL:
2427
required: true
25-
GIT_USERNAME:
26-
required: true
2728

2829
jobs:
2930
build_homebrew:
@@ -148,7 +149,7 @@ jobs:
148149
actionlint_config: "---\n# empty config"
149150
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
150151
git_email: ${{ secrets.GIT_EMAIL }}
151-
git_username: ${{ secrets.GIT_USERNAME }}
152+
git_username: ${{ inputs.git_username }}
152153
publish: false
153154
token: ${{ secrets.GH_TOKEN }}
154155
validate: true

0 commit comments

Comments
 (0)