Skip to content

Commit 506ad5d

Browse files
authored
refactor release pipeline: TAG_TOKEN, skip-checks gate, dependabot/zizmor cleanup (#5003)
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
1 parent 1f4f933 commit 506ad5d

3 files changed

Lines changed: 16 additions & 34 deletions

File tree

.github/dependabot.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
# Dependabot configuration
2-
#
3-
# Grouping behavior (see inline comments for details):
4-
# - Minor + patch updates: grouped into a single PR per ecosystem
5-
# - Major version bumps: individual PR per dependency
6-
# - Security updates: individual PR per dependency
7-
#
8-
# Note: "patch" refers to semver version bumps (1.2.3 -> 1.2.4), not security fixes.
9-
# Security updates are identified separately via GitHub's Advisory Database and
10-
# can be any version bump (patch, minor, or major) that fixes a known CVE.
112

123
version: 2
134

@@ -30,14 +21,6 @@ updates:
3021
- dependency-name: "github.com/aquasecurity/go-version"
3122
- dependency-name: "github.com/knqyf263/go-apk-version"
3223
- dependency-name: "github.com/knqyf263/go-deb-version"
33-
groups:
34-
go-minor-patch:
35-
applies-to: version-updates # security updates get individual PRs
36-
patterns:
37-
- "*"
38-
update-types: # major omitted, gets individual PRs
39-
- "minor"
40-
- "patch"
4124

4225
- package-ecosystem: "github-actions"
4326
directories:
@@ -51,11 +34,3 @@ updates:
5134
open-pull-requests-limit: 10
5235
labels:
5336
- "dependencies"
54-
groups:
55-
actions-minor-patch:
56-
applies-to: version-updates # security updates get individual PRs
57-
patterns:
58-
- "*"
59-
update-types: # major omitted, gets individual PRs
60-
- "minor"
61-
- "patch"

.github/workflows/release.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ on:
2121
options:
2222
- "all"
2323
- "install-script-only"
24+
skip-checks:
25+
description: skip the check-gate (release even if checks haven't passed on main)
26+
type: boolean
27+
default: false
28+
required: false
2429

2530
jobs:
2631
version-available:
@@ -32,7 +37,7 @@ jobs:
3237
version: ${{ github.event.inputs.version }}
3338

3439
check-gate:
35-
if: ${{ github.event.inputs.phase == 'all' }}
40+
if: ${{ github.event.inputs.phase == 'all' && !inputs.skip-checks }}
3641
permissions:
3742
contents: read
3843
checks: read # required for getting the status of specific check names
@@ -45,7 +50,14 @@ jobs:
4550

4651
release:
4752
needs: [check-gate, version-available]
48-
if: ${{ github.event.inputs.phase == 'all' }}
53+
# run even when check-gate is skipped, but never when version-available
54+
# failed/was skipped, nor when check-gate failed or was cancelled. note:
55+
# always() disables the implicit success() gate on ALL needs, so the
56+
# version-available requirement must be re-asserted explicitly here.
57+
if: >-
58+
${{ always()
59+
&& needs.version-available.result == 'success'
60+
&& !contains(fromJSON('["failure", "cancelled"]'), needs.check-gate.result) }}
4961
environment: release
5062
# runs-on.com: compute instances for parallel builds
5163
# spot disabled: reliability for build workflows (used for releases too)
@@ -82,8 +94,8 @@ jobs:
8294
- name: Build & publish release artifacts
8395
run: make ci-release
8496
env:
85-
# used for pushing tags
86-
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
97+
# for pushing tags (does not inherit workflow permissions)
98+
TAG_TOKEN: ${{ secrets.TAG_TOKEN }}
8799
RELEASE_VERSION: ${{ github.event.inputs.version }}
88100
# for mac signing and notarization...
89101
QUILL_SIGN_P12: ${{ secrets.ANCHORE_APPLE_DEVELOPER_ID_CERT_CHAIN }}

.github/zizmor.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
rules:
2-
unpinned-uses:
3-
config:
4-
policies:
5-
# anchore/workflows is an internal repository; using @main is acceptable
6-
anchore/*: any
72
dangerous-triggers:
83
ignore:
94
# Safe use of pull_request_target - only runs trusted scripts from base repo,

0 commit comments

Comments
 (0)