Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,3 @@ updates:
interval: "weekly"
cooldown:
default-days: 7
groups:
minor-and-patch:
update-types:
- "minor"
- "patch"
17 changes: 16 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
version:
description: tag the latest commit on main with the given version (prefixed with v)
required: true
skip-checks:
description: skip pre-release checks (check-gate)
type: boolean
default: false

jobs:
version-available:
Expand All @@ -23,7 +27,9 @@ jobs:
version: ${{ github.event.inputs.version }}

check-gate:
if: ${{ !inputs.skip-checks }}
permissions:
contents: read # required for the reusable workflow to check out the repo
checks: read # required for getting the status of specific check names
uses: anchore/workflows/.github/workflows/check-gate.yaml@b0c30a80409130d329aaa356fd64a34d8c0b3375 # v0.7.2
with:
Expand All @@ -34,6 +40,14 @@ jobs:

tag:
needs: [check-gate, version-available]
# run even when check-gate is skipped, but never when version-available
# failed/was skipped, nor when check-gate failed or was cancelled. note:
# always() disables the implicit success() gate on ALL needs, so the
# version-available requirement must be re-asserted explicitly here.
if: >-
${{ always()
&& needs.version-available.result == 'success'
&& !contains(fromJSON('["failure", "cancelled"]'), needs.check-gate.result) }}
runs-on: ubuntu-22.04
permissions:
contents: write
Expand All @@ -43,11 +57,12 @@ jobs:
# in order to properly resolve the version from git
fetch-depth: 0
persist-credentials: true
# for pushing tags (does not inherit workflow permissions)
token: ${{ secrets.TAG_TOKEN }}

- name: Tag release
env:
VERSION_INPUT: ${{ github.event.inputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "anchoreci"
git config --global user.email "anchoreci@users.noreply.github.com"
Expand Down
7 changes: 1 addition & 6 deletions .github/zizmor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
rules:
unpinned-uses:
config:
policies:
# anchore/workflows is an internal repository; using @main is acceptable
anchore/*: any
rules: {}