mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-08 00:37:27 +00:00
Bumps the ci group with 11 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `4.2.0` | `4.2.2` | | [actions/setup-go](https://github.com/actions/setup-go) | `5.0.2` | `5.1.0` | | [fluxcd/pkg](https://github.com/fluxcd/pkg) | `30c101fc7c9fac4d84937ff4890a3da46a9db2dd` | `5bf9095331052934ae6b4585b8632c0e5b0a2106` | | [google-github-actions/auth](https://github.com/google-github-actions/auth) | `2.1.5` | `2.1.7` | | [google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud) | `2.1.1` | `2.1.2` | | [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.6.1` | `3.7.1` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.4.0` | `4.4.3` | | [github/codeql-action](https://github.com/github/codeql-action) | `3.26.9` | `3.27.6` | | [anchore/sbom-action](https://github.com/anchore/sbom-action) | `0.17.2` | `0.17.8` | | [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `3.6.0` | `3.7.0` | | [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) | `6.0.0` | `6.1.0` | Updates `actions/checkout` from 4.2.0 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](d632683dd7...11bd71901b) Updates `actions/setup-go` from 5.0.2 to 5.1.0 - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](0a12ed9d6a...41dfa10bad) Updates `fluxcd/pkg` from 30c101fc7c9fac4d84937ff4890a3da46a9db2dd to 5bf9095331052934ae6b4585b8632c0e5b0a2106 - [Commits](30c101fc7c...5bf9095331) Updates `google-github-actions/auth` from 2.1.5 to 2.1.7 - [Release notes](https://github.com/google-github-actions/auth/releases) - [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md) - [Commits](62cf5bd3e4...6fc4af4b14) Updates `google-github-actions/setup-gcloud` from 2.1.1 to 2.1.2 - [Release notes](https://github.com/google-github-actions/setup-gcloud/releases) - [Changelog](https://github.com/google-github-actions/setup-gcloud/blob/main/CHANGELOG.md) - [Commits](f0990588f1...6189d56e40) Updates `docker/setup-buildx-action` from 3.6.1 to 3.7.1 - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](988b5a0280...c47758b77c) Updates `actions/upload-artifact` from 4.4.0 to 4.4.3 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](50769540e7...b4b15b8c7c) Updates `github/codeql-action` from 3.26.9 to 3.27.6 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](461ef6c76d...aa57810251) Updates `anchore/sbom-action` from 0.17.2 to 0.17.8 - [Release notes](https://github.com/anchore/sbom-action/releases) - [Changelog](https://github.com/anchore/sbom-action/blob/main/RELEASE.md) - [Commits](61119d458a...55dc4ee224) Updates `sigstore/cosign-installer` from 3.6.0 to 3.7.0 - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](4959ce089c...dc72c7d5c4) Updates `goreleaser/goreleaser-action` from 6.0.0 to 6.1.0 - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](286f3b13b1...9ed2f89a66) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: ci - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci - dependency-name: fluxcd/pkg dependency-type: direct:production dependency-group: ci - dependency-name: google-github-actions/auth dependency-type: direct:production update-type: version-update:semver-patch dependency-group: ci - dependency-name: google-github-actions/setup-gcloud dependency-type: direct:production update-type: version-update:semver-patch dependency-group: ci - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch dependency-group: ci - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci - dependency-name: anchore/sbom-action dependency-type: direct:production update-type: version-update:semver-patch dependency-group: ci - dependency-name: sigstore/cosign-installer dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci - dependency-name: goreleaser/goreleaser-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci ... Signed-off-by: dependabot[bot] <support@github.com>
211 lines
8.8 KiB
YAML
211 lines
8.8 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags: [ 'v*' ]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
release-flux-cli:
|
|
outputs:
|
|
hashes: ${{ steps.slsa.outputs.hashes }}
|
|
image_url: ${{ steps.slsa.outputs.image_url }}
|
|
image_digest: ${{ steps.slsa.outputs.image_digest }}
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # needed to write releases
|
|
id-token: write # needed for keyless signing
|
|
packages: write # needed for ghcr access
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Unshallow
|
|
run: git fetch --prune --unshallow
|
|
- name: Setup Go
|
|
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
|
|
with:
|
|
go-version: 1.23.x
|
|
cache: false
|
|
- name: Setup QEMU
|
|
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
|
|
- name: Setup Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
|
|
- name: Setup Syft
|
|
uses: anchore/sbom-action/download-syft@55dc4ee22412511ee8c3142cbea40418e6cec693 # v0.17.8
|
|
- name: Setup Cosign
|
|
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
|
|
- name: Setup Kustomize
|
|
uses: fluxcd/pkg/actions/kustomize@5bf9095331052934ae6b4585b8632c0e5b0a2106 # main
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: fluxcdbot
|
|
password: ${{ secrets.GHCR_TOKEN }}
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
|
with:
|
|
username: fluxcdbot
|
|
password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
|
|
- name: Generate manifests
|
|
run: |
|
|
make cmd/flux/.manifests.done
|
|
./manifests/scripts/bundle.sh "" ./output manifests.tar.gz
|
|
kustomize build ./manifests/install > ./output/install.yaml
|
|
- name: Build CRDs
|
|
run: |
|
|
kustomize build manifests/crds > all-crds.yaml
|
|
- name: Generate OpenAPI JSON schemas from CRDs
|
|
uses: fluxcd/pkg/actions/crdjsonschema@5bf9095331052934ae6b4585b8632c0e5b0a2106 # main
|
|
with:
|
|
crd: all-crds.yaml
|
|
output: schemas
|
|
- name: Archive the OpenAPI JSON schemas
|
|
run: |
|
|
tar -czvf ./output/crd-schemas.tar.gz -C schemas .
|
|
- name: Download release notes utility
|
|
env:
|
|
GH_REL_URL: https://github.com/buchanae/github-release-notes/releases/download/0.2.0/github-release-notes-linux-amd64-0.2.0.tar.gz
|
|
run: cd /tmp && curl -sSL ${GH_REL_URL} | tar xz && sudo mv github-release-notes /usr/local/bin/
|
|
- name: Generate release notes
|
|
run: |
|
|
NOTES="./output/notes.md"
|
|
echo '## CLI Changelog' > ${NOTES}
|
|
github-release-notes -org fluxcd -repo flux2 -since-latest-release -include-author >> ${NOTES}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Run GoReleaser
|
|
id: run-goreleaser
|
|
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0
|
|
with:
|
|
version: latest
|
|
args: release --release-notes=output/notes.md --skip=validate
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
|
AUR_BOT_SSH_PRIVATE_KEY: ${{ secrets.AUR_BOT_SSH_PRIVATE_KEY }}
|
|
- name: Generate SLSA metadata
|
|
id: slsa
|
|
env:
|
|
ARTIFACTS: "${{ steps.run-goreleaser.outputs.artifacts }}"
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
hashes=$(echo -E $ARTIFACTS | jq --raw-output '.[] | {name, "digest": (.extra.Digest // .extra.Checksum)} | select(.digest) | {digest} + {name} | join(" ") | sub("^sha256:";"")' | base64 -w0)
|
|
echo "hashes=$hashes" >> $GITHUB_OUTPUT
|
|
|
|
image_url=fluxcd/flux-cli:$GITHUB_REF_NAME
|
|
echo "image_url=$image_url" >> $GITHUB_OUTPUT
|
|
|
|
image_digest=$(docker buildx imagetools inspect ${image_url} --format '{{json .}}' | jq -r .manifest.digest)
|
|
echo "image_digest=$image_digest" >> $GITHUB_OUTPUT
|
|
|
|
release-flux-manifests:
|
|
runs-on: ubuntu-latest
|
|
needs: release-flux-cli
|
|
permissions:
|
|
id-token: write
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Setup Kustomize
|
|
uses: fluxcd/pkg/actions/kustomize@5bf9095331052934ae6b4585b8632c0e5b0a2106 # main
|
|
- name: Setup Flux CLI
|
|
uses: ./action/
|
|
- name: Prepare
|
|
id: prep
|
|
run: |
|
|
VERSION=$(flux version --client | awk '{ print $NF }')
|
|
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
|
- name: Login to GHCR
|
|
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: fluxcdbot
|
|
password: ${{ secrets.GHCR_TOKEN }}
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
|
with:
|
|
username: fluxcdbot
|
|
password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
|
|
- name: Push manifests to GHCR
|
|
run: |
|
|
mkdir -p ./ghcr.io/flux-system
|
|
flux install --registry=ghcr.io/fluxcd \
|
|
--components-extra=image-reflector-controller,image-automation-controller \
|
|
--export > ./ghcr.io/flux-system/gotk-components.yaml
|
|
|
|
cd ./ghcr.io && flux push artifact \
|
|
oci://ghcr.io/fluxcd/flux-manifests:${{ steps.prep.outputs.version }} \
|
|
--path="./flux-system" \
|
|
--source=${{ github.repositoryUrl }} \
|
|
--revision="${{ github.ref_name }}@sha1:${{ github.sha }}"
|
|
- name: Push manifests to DockerHub
|
|
run: |
|
|
mkdir -p ./docker.io/flux-system
|
|
flux install --registry=docker.io/fluxcd \
|
|
--components-extra=image-reflector-controller,image-automation-controller \
|
|
--export > ./docker.io/flux-system/gotk-components.yaml
|
|
|
|
cd ./docker.io && flux push artifact \
|
|
oci://docker.io/fluxcd/flux-manifests:${{ steps.prep.outputs.version }} \
|
|
--path="./flux-system" \
|
|
--source=${{ github.repositoryUrl }} \
|
|
--revision="${{ github.ref_name }}@sha1:${{ github.sha }}"
|
|
- uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
|
|
- name: Sign manifests
|
|
env:
|
|
COSIGN_EXPERIMENTAL: 1
|
|
run: |
|
|
cosign sign --yes ghcr.io/fluxcd/flux-manifests:${{ steps.prep.outputs.version }}
|
|
cosign sign --yes docker.io/fluxcd/flux-manifests:${{ steps.prep.outputs.version }}
|
|
- name: Tag manifests
|
|
run: |
|
|
flux tag artifact oci://ghcr.io/fluxcd/flux-manifests:${{ steps.prep.outputs.version }} \
|
|
--tag latest
|
|
|
|
flux tag artifact oci://docker.io/fluxcd/flux-manifests:${{ steps.prep.outputs.version }} \
|
|
--tag latest
|
|
|
|
release-provenance:
|
|
needs: [release-flux-cli]
|
|
permissions:
|
|
actions: read # for detecting the Github Actions environment.
|
|
id-token: write # for creating OIDC tokens for signing.
|
|
contents: write # for uploading attestations to GitHub releases.
|
|
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0
|
|
with:
|
|
provenance-name: "provenance.intoto.jsonl"
|
|
base64-subjects: "${{ needs.release-flux-cli.outputs.hashes }}"
|
|
upload-assets: true
|
|
|
|
dockerhub-provenance:
|
|
needs: [release-flux-cli]
|
|
permissions:
|
|
actions: read # for detecting the Github Actions environment.
|
|
id-token: write # for creating OIDC tokens for signing.
|
|
packages: write # for uploading attestations.
|
|
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.0.0
|
|
with:
|
|
image: ${{ needs.release-flux-cli.outputs.image_url }}
|
|
digest: ${{ needs.release-flux-cli.outputs.image_digest }}
|
|
registry-username: fluxcdbot
|
|
secrets:
|
|
registry-password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
|
|
|
|
ghcr-provenance:
|
|
needs: [release-flux-cli]
|
|
permissions:
|
|
actions: read # for detecting the Github Actions environment.
|
|
id-token: write # for creating OIDC tokens for signing.
|
|
packages: write # for uploading attestations.
|
|
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.0.0
|
|
with:
|
|
image: ghcr.io/${{ needs.release-flux-cli.outputs.image_url }}
|
|
digest: ${{ needs.release-flux-cli.outputs.image_digest }}
|
|
registry-username: fluxcdbot
|
|
secrets:
|
|
registry-password: ${{ secrets.GHCR_TOKEN }}
|