-
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.61 KB
/
Copy pathgovernance.yml
File metadata and controls
48 lines (45 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
name: Governance
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
permissions:
actions: read
contents: read
jobs:
governance:
uses: hyperpolymath/standards/.github/workflows/governance-reusable.yml@a8f7249c3c5aef1ed6dfa16e637f13dfde815464
permissions:
actions: read
contents: read
security-events: write
ruleset-regression:
name: Ruleset repair regression
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
contents: read
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Check shell syntax and offline ruleset behaviour
shell: bash
run: |
bash -n scripts/branch-protection-apply.sh test/branch-protection-apply-test.sh
bash test/branch-protection-apply-test.sh
- name: Build the maintenance CLI package
run: docker build --file Containerfile.maintenance --tag git-scripts-maintenance:test .
- name: Exercise the package without network or a writable root filesystem
run: |
# The suite creates an executable gh test double in /tmp.
docker run --rm --network none --read-only --cap-drop ALL \
--security-opt no-new-privileges \
--tmpfs /tmp:rw,exec,nosuid,nodev,uid=10001,gid=10001 \
--tmpfs /state:rw,nosuid,nodev,uid=10001,gid=10001 \
--entrypoint bash git-scripts-maintenance:test \
/opt/git-scripts/test/branch-protection-apply-test.sh