Skip to content

Commit 657b285

Browse files
ci(gh actions): reviewed permissions, secret names and use of OS var
1 parent b74cb8d commit 657b285

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

.github/workflows/auto-merge-dependabot-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
dependabot:
1818
name: Auto-merge Dependabot PR
19-
runs-on: ubuntu-latest
19+
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
2020
needs: tests
2121
if: ${{ github.actor == 'dependabot[bot]' }}
2222
steps:
@@ -31,4 +31,4 @@ jobs:
3131
run: gh pr merge --auto --merge "$PR_URL"
3232
env:
3333
PR_URL: ${{github.event.pull_request.html_url}}
34-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
34+
GITHUB_TOKEN: ${{secrets.RTLDEV_MW_CI_TOKEN}}

.github/workflows/release.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
name: Release
22
on:
3-
# will run for every branch, except tags. See RSRMID-206.
43
push:
5-
# Sequence of patterns matched against refs/heads
64
branches:
75
- master
86

97
jobs:
108
build:
119
name: Build
1210
uses: ./.github/workflows/test.yml
11+
permissions:
12+
contents: read
13+
packages: write
1314

1415
release:
1516
name: Release @ ubuntu-latest
16-
runs-on: ubuntu-latest
17+
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
18+
permissions:
19+
contents: write
20+
issues: write
21+
deployments: write
1722
needs: build
1823
steps:
1924
- name: Checkout
@@ -44,15 +49,15 @@ jobs:
4449
run: npm ci
4550
- name: Release
4651
env:
47-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
52+
GITHUB_TOKEN: ${{ secrets.RTLDEV_MW_CI_TOKEN }}
4853
MAVEN_OPTS: ${{ vars.MAVEN_OPTS }}
4954
OSSRH_JIRA_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }}
5055
OSSRH_JIRA_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }}
5156
ENCRYPTED_C9F9AEDF26B7_KEY: ${{ secrets.ENCRYPTED_C9F9AEDF26B7_KEY }}
5257
ENCRYPTED_C9F9AEDF26B7_IV: ${{ secrets.ENCRYPTED_C9F9AEDF26B7_IV }}
5358
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
5459
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
55-
RTLDEV_MW_NOTIFICATION_URI: ${{ secrets.RTLDEV_MW_NOTIFICATION_URI }}
60+
RTLDEV_MW_NOTIFICATION_URI: ${{ secrets.RTLDEV_MW_CI_NOTIFICATION_URI }}
5661
run: |
5762
openssl aes-256-cbc -K $ENCRYPTED_C9F9AEDF26B7_KEY -iv $ENCRYPTED_C9F9AEDF26B7_IV -in codesigning.asc.enc -out codesigning.asc -d
5863
gpg --import --batch codesigning.asc

.github/workflows/test.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ jobs:
88
# as the build names above change each time Node versions change
99
lint:
1010
name: 🧪 Linting
11-
runs-on: ubuntu-latest
11+
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
12+
permissions:
13+
contents: read
14+
packages: read
1215
steps:
1316
- name: Checkout
1417
uses: actions/checkout@v4
@@ -26,7 +29,11 @@ jobs:
2629
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2730

2831
test_matrix:
29-
runs-on: ubuntu-latest
32+
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
33+
permissions:
34+
contents: write
35+
packages: write
36+
deployments: write
3037

3138
strategy:
3239
matrix:

0 commit comments

Comments
 (0)