forked from ChelseaKR/queer-the-stacks
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 2.24 KB
/
Copy pathstandards.yml
File metadata and controls
57 lines (49 loc) · 2.24 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
49
50
51
52
53
54
55
56
57
# Standards check — fetches the PINNED portfolio-standards at build time and
# runs the freshness gate. Nothing from portfolio-standards is committed into
# this repo; the standards exist only on the runner (.standards/, gitignored).
#
# Maintainer-originated branches use the read-only STANDARDS_DEPLOY_KEY. GitHub
# deliberately withholds repository secrets from forks, so forked PRs run the
# self-contained `make verify` gate in ci.yml and record that the private policy
# overlay is deferred until trusted code reaches main.
name: standards
on:
push:
branches: [main]
pull_request:
# Least privilege: this job only reads. No write scope is granted to GITHUB_TOKEN.
permissions:
contents: read
concurrency:
group: standards-${{ github.ref }}
cancel-in-progress: true
jobs:
standards:
name: standards
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Fetch pinned standards (private, read-only deploy key)
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
repository: ChelseaKR/portfolio-standards
ref: v1.0.1 # bump in lockstep with .standards-version
ssh-key: ${{ secrets.STANDARDS_DEPLOY_KEY }}
path: .standards
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: '3.x'
- name: Standards freshness gate
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
run: python3 .standards/automation/check_staleness.py --standards-dir .standards
- name: Fork policy boundary
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
run: |
test -s .standards-version
echo "Private portfolio policy is unavailable to forks; ci/verify is authoritative for this pull request."