Files
ukmesh/.github/workflows/release.yml
T
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> f990c6bd74 chore(deps): bump the actions group across 1 directory with 6 updates (#71)
Bumps the actions group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4.4.0` | `7.0.1` |
| [actions/setup-node](https://github.com/actions/setup-node) | `4.4.0` | `7.0.0` |
| [actions/setup-python](https://github.com/actions/setup-python) | `5.6.0` | `7.0.0` |
| [gitleaks/gitleaks-action](https://github.com/gitleaks/gitleaks-action) | `2.3.9` | `3.0.0` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `4.2.0` | `4.3.0` |
| [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `3.9.1` | `4.1.2` |



Updates `actions/checkout` from 4.4.0 to 7.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.4.0...3d3c42e5aac5ba805825da76410c181273ba90b1)

Updates `actions/setup-node` from 4.4.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4.4.0...820762786026740c76f36085b0efc47a31fe5020)

Updates `actions/setup-python` from 5.6.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/a26af69be951a213d495a4c3e4e4022e16d87065...5fda3b95a4ea91299a34e894583c3862153e4b97)

Updates `gitleaks/gitleaks-action` from 2.3.9 to 3.0.0
- [Release notes](https://github.com/gitleaks/gitleaks-action/releases)
- [Commits](https://github.com/gitleaks/gitleaks-action/compare/ff98106e4c7b2bc287b24eaf42907196329070c7...e0c47f4f8be36e29cdc102c57e68cb5cbf0e8d1e)

Updates `docker/setup-buildx-action` from 4.2.0 to 4.3.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/bb05f3f5519dd87d3ba754cc423b652a5edd6d2c...37fe631027851001ddb9b187196cc803df7f5f0e)

Updates `sigstore/cosign-installer` from 3.9.1 to 4.1.2
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/398d4b0eeef1380460a10c8013a76f728fb906ac...6f9f17788090df1f26f669e9d70d6ae9567deba6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-node
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-python
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: gitleaks/gitleaks-action
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/setup-buildx-action
  dependency-version: 4.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: sigstore/cosign-installer
  dependency-version: 4.1.2
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-27 09:41:49 +01:00

200 lines
7.6 KiB
YAML

name: Signed container release
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
policy:
name: Release policy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: 22
- name: Validate vulnerability waivers
run: node scripts/check-trivy-waivers.mjs
- name: Require a clean commit release
run: test -z "$(git status --porcelain --untracked-files=all)"
image:
name: ${{ matrix.component }}
needs: policy
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
attestations: write
strategy:
fail-fast: false
matrix:
include:
- component: backend
image: meshcore-backend
context: .
file: Dockerfile.backend
build_args: ''
- component: combined
image: meshcore-combined
context: .
file: Dockerfile
build_args: VITE_APP_HOSTNAME=app.ukmesh.com
- component: app
image: meshcore-app
context: .
file: Dockerfile.app
build_args: |
VITE_APP_HOSTNAME=app.ukmesh.com
VITE_NETWORK=ukmesh
VITE_SITE=ukmesh
VITE_RF_COVERAGE_ENABLED=true
- component: website
image: meshcore-website
context: .
file: Dockerfile.website
build_args: |
VITE_APP_HOSTNAME=app.ukmesh.com
VITE_SITE=ukmesh
- component: rf-worker
image: meshcore-rf-worker
context: viewshed-worker
file: viewshed-worker/Dockerfile
build_args: ''
- component: hopreach
image: meshcore-hopreach
context: third_party/hopreach
file: third_party/hopreach/Dockerfile
source_revision: 0230702be70a2729c5acc5640401f56ab9d65fd4
build_args: VERSION=v0.1.32-ukmesh.3
- component: mosquitto-reloader
image: meshcore-mosquitto-reloader
context: .
file: Dockerfile.mosquitto-reloader
build_args: ''
- component: health-check
image: meshcore-health-check
context: .
file: Dockerfile.mesh-health-check
build_args: MESH_HEALTH_CHECK_REF=952eec8e0c55d0749f9abef211c266f992c0bfc7
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/${{ matrix.image }}
SOURCE_REVISION: ${{ matrix.source_revision || github.sha }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
labels: |
org.opencontainers.image.revision=${{ env.SOURCE_REVISION }}
tags: |
type=sha,format=long
type=ref,event=tag
- id: build
name: Build and push immutable image
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: ${{ matrix.context }}
file: ${{ matrix.file }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
SOURCE_REVISION=${{ env.SOURCE_REVISION }}
${{ matrix.build_args }}
provenance: false
sbom: false
cache-from: type=gha,scope=${{ matrix.component }}
cache-to: type=gha,mode=max,scope=${{ matrix.component }}
- name: Gate exact digest on critical vulnerabilities
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
scan-type: image
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build.outputs.digest }}
format: json
output: trivy-${{ matrix.component }}.json
exit-code: '1'
severity: CRITICAL
ignore-unfixed: false
trivyignores: .trivyignore.yaml
- name: Generate SPDX SBOM for exact digest
uses: anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610 # v0
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build.outputs.digest }}
format: spdx-json
output-file: sbom-${{ matrix.component }}.spdx.json
upload-artifact: false
- uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
- name: Sign and attach SBOM attestation
env:
DIGEST: ${{ steps.build.outputs.digest }}
run: |
image="${REGISTRY}/${IMAGE_NAME}@${DIGEST}"
cosign sign --yes "$image"
cosign attest --yes \
--predicate "sbom-${{ matrix.component }}.spdx.json" \
--type spdxjson "$image"
cosign verify "$image" \
--certificate-identity-regexp "^https://github.com/${GITHUB_REPOSITORY}/.github/workflows/release.yml@" \
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
> "signature-${{ matrix.component }}.json"
- id: provenance
name: Publish registry provenance
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.build.outputs.digest }}
push-to-registry: true
- name: Write release inventory
env:
DIGEST: ${{ steps.build.outputs.digest }}
ATTESTATION_URL: ${{ steps.provenance.outputs.attestation-url }}
run: |
jq -n \
--arg component "${{ matrix.component }}" \
--arg source_revision "$SOURCE_REVISION" \
--arg release_revision "$GITHUB_SHA" \
--arg image "${REGISTRY}/${IMAGE_NAME}@${DIGEST}" \
--arg sbom "sbom-${{ matrix.component }}.spdx.json" \
--arg scan "trivy-${{ matrix.component }}.json" \
--arg signature "signature-${{ matrix.component }}.json" \
--arg provenance "$ATTESTATION_URL" \
'{
format: "meshcore-release-inventory-v1",
component: $component,
source_revision: $source_revision,
release_revision: $release_revision,
image: $image,
sbom: $sbom,
scan: $scan,
signature: $signature,
provenance: $provenance
}' > "inventory-${{ matrix.component }}.json"
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: release-${{ github.sha }}-${{ matrix.component }}
if-no-files-found: error
retention-days: 90
path: |
inventory-${{ matrix.component }}.json
sbom-${{ matrix.component }}.spdx.json
trivy-${{ matrix.component }}.json
signature-${{ matrix.component }}.json