Skip to content

Commit

Permalink
ci(gh actions): reviewed permissions, secret names and use of OS var
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiSchwarz-cnic committed Nov 9, 2023
1 parent b74cb8d commit 657b285
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/auto-merge-dependabot-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

dependabot:
name: Auto-merge Dependabot PR
runs-on: ubuntu-latest
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
needs: tests
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
Expand All @@ -31,4 +31,4 @@ jobs:
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{secrets.RTLDEV_MW_CI_TOKEN}}
15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
name: Release
on:
# will run for every branch, except tags. See RSRMID-206.
push:
# Sequence of patterns matched against refs/heads
branches:
- master

jobs:
build:
name: Build
uses: ./.github/workflows/test.yml
permissions:
contents: read
packages: write

release:
name: Release @ ubuntu-latest
runs-on: ubuntu-latest
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
permissions:
contents: write
issues: write
deployments: write
needs: build
steps:
- name: Checkout
Expand Down Expand Up @@ -44,15 +49,15 @@ jobs:
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.RTLDEV_MW_CI_TOKEN }}
MAVEN_OPTS: ${{ vars.MAVEN_OPTS }}
OSSRH_JIRA_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }}
OSSRH_JIRA_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }}
ENCRYPTED_C9F9AEDF26B7_KEY: ${{ secrets.ENCRYPTED_C9F9AEDF26B7_KEY }}
ENCRYPTED_C9F9AEDF26B7_IV: ${{ secrets.ENCRYPTED_C9F9AEDF26B7_IV }}
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
RTLDEV_MW_NOTIFICATION_URI: ${{ secrets.RTLDEV_MW_NOTIFICATION_URI }}
RTLDEV_MW_NOTIFICATION_URI: ${{ secrets.RTLDEV_MW_CI_NOTIFICATION_URI }}
run: |
openssl aes-256-cbc -K $ENCRYPTED_C9F9AEDF26B7_KEY -iv $ENCRYPTED_C9F9AEDF26B7_IV -in codesigning.asc.enc -out codesigning.asc -d
gpg --import --batch codesigning.asc
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ jobs:
# as the build names above change each time Node versions change
lint:
name: 🧪 Linting
runs-on: ubuntu-latest
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
permissions:
contents: read
packages: read
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -26,7 +29,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test_matrix:
runs-on: ubuntu-latest
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
permissions:
contents: write
packages: write
deployments: write

strategy:
matrix:
Expand Down

0 comments on commit 657b285

Please sign in to comment.