Skip to content

Commit

Permalink
more CI hardening
Browse files Browse the repository at this point in the history
  • Loading branch information
louiseschmidtgen committed May 22, 2024
1 parent 52c2dbb commit 5656ae9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/strict-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@ on:
- main
- 'release-[0-9]+.[0-9]+'
- 'autoupdate/sync/**'
- KU-629/harden-CI-follow-up #TODO: rm after testing
pull_request:

permissions:
contents: read

jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Checking out repo
uses: actions/checkout@v4
- name: Install lxd
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/strict.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- 'release-[0-9]+.[0-9]+'
- KU-629/harden-CI-follow-up #TODO: rm after testing

permissions:
contents: read
Expand All @@ -16,6 +17,10 @@ jobs:
outputs:
strict: ${{ steps.determine.outputs.strict }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Determine Strict branch
id: determine
env:
Expand All @@ -37,6 +42,10 @@ jobs:
needs: [ prepare ]
if: ${{ needs.prepare.outputs.strict }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Sync ${{ github.ref }} to ${{ needs.prepare.outputs.strict }}
uses: actions/checkout@v4
with:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/update-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@ on:
workflow_dispatch:
schedule:
- cron: "0 10 * * *"
push: #TODO: rm after testing
branches:
- KU-629/harden-CI-follow-up

permissions:
contents: read

jobs:
update:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -18,6 +27,10 @@ jobs:
- release-1.30

steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Checking out repo
uses: actions/checkout@v4
with:
Expand Down

0 comments on commit 5656ae9

Please sign in to comment.