Files
Dylan M. Taylor 135b3c573e ci: run Harden-Runner on every job (#3)
Adds step-security/harden-runner (audit, pinned to v2.22.4 like
craft-common-actions) as the first step of each job that did not have it,
so every workflow in the org's public repos reports its egress to
StepSecurity. Audit, not block: block-mode allow lists come from each
job's observed traffic.
2026-11-11 12:43:12 -05:00

60 lines
1.4 KiB
YAML

name: changelog
on:
pull_request:
paths:
- ".github/workflows/changelog.yml"
- "CHANGELOG.md"
- "xtask/**/*"
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled
env:
#
# Dependency versioning
#
# This is the MSRV used by all repository infrastructure.
REPO_MSRV: "1.96.1"
#
# Environment variables
#
CARGO_INCREMENTAL: false
CARGO_TERM_COLOR: always
RUST_LOG: info
RUST_BACKTRACE: "1"
CACHE_SUFFIX: c # cache busting
jobs:
changelog:
timeout-minutes: 2
name: Check changelog for errors
runs-on: ubuntu-24.04
permissions: {}
steps:
- name: Harden runner
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
with:
egress-policy: audit
- name: Checkout repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
# NOTE: Keep label name(s) in sync. with `xtask`'s implementation.
- name: Run `cargo xtask changelog …`
env:
GITHUB_EVENT_PULL_REQUEST_BASE_REF: ${{ github.event.pull_request.base.ref }}
run: |
cargo xtask changelog "origin/${GITHUB_EVENT_PULL_REQUEST_BASE_REF}" ${{ contains(github.event.pull_request.labels.*.name, 'changelog: released entry changed') && '--allow-released-changes' || '' }}