Files
open-cluster-management/.github/workflows/post.yml
dependabot[bot]andlnx01 d9b5b3289d 🌱 Bump the github-actions group across 1 directory with 4 updates (#1645)
Bumps the github-actions group with 4 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [ossf/scorecard-action](https://github.com/ossf/scorecard-action), [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) and [actions/stale](https://github.com/actions/stale).


Updates `actions/checkout` from 7.0.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/9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0...3d3c42e5aac5ba805825da76410c181273ba90b1)

Updates `ossf/scorecard-action` from 2.4.3 to 2.4.4
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/4eaacf0543bb3f2c246792bd56e8cdeffafb205a...2d1146689b8cda280b9bc96326124645441f03bc)

Updates `github/codeql-action/upload-sarif` from 4.37.1 to 4.37.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/7188fc363630916deb702c7fdcf4e481b751f97a...f205ea1c3313d32999d8d6a48b4f6530d4437b38)

Updates `actions/stale` from 10.4.0 to 11.0.0
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/1e223db275d687790206a7acac4d1a11bd6fe629...4391f3da665fdf50b6810c1a66712fb9ba21aa93)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action/upload-sarif
  dependency-version: 4.37.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/stale
  dependency-version: 11.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

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

149 lines
5.9 KiB
YAML

name: Post
on:
push:
paths-ignore:
- 'solutions/**'
- 'assets/**'
- 'troubleshooting/**'
- ".github/ISSUE_TEMPLATE/*"
branches:
- main
workflow_dispatch: {}
env:
# Common versions
GO_VERSION: '1.26'
GO_REQUIRED_MIN_VERSION: ''
permissions:
contents: read
id-token: write
attestations: write
jobs:
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: install Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: unit
run: make test
- name: report coverage
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6
with:
token: ${{ secrets.CODECOV_UPLOAD_TOKEN }}
files: ./coverage.out
flags: unit
name: unit
verbose: true
fail_ci_if_error: true
images:
name: images
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ amd64, arm64 ]
image-name: [ registration-operator, registration, work, placement, addon-manager ]
steps:
- name: checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: install Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: install imagebuilder
run: go install github.com/openshift/imagebuilder/cmd/imagebuilder@v1.2.3
- name: pull base image
run: docker pull registry.access.redhat.com/ubi9/ubi-micro:latest --platform=linux/${{ matrix.arch }}
- name: images
run: |
IMAGE_TAG=latest-${{ matrix.arch }} \
IMAGE_REGISTRY=quay.io/open-cluster-management \
IMAGE_BUILD_EXTRA_FLAGS="--build-arg OS=linux --build-arg ARCH=${{ matrix.arch }}" \
make image-${{ matrix.image-name }}
- name: push
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login quay.io --username ${{ secrets.DOCKER_USER }} --password-stdin
docker push quay.io/open-cluster-management/${{ matrix.image-name }}:latest-${{ matrix.arch }}
image_digest=$(docker inspect --format='{{index .RepoDigests 0}}' "quay.io/open-cluster-management/${{ matrix.image-name }}:latest-${{ matrix.arch }}" | cut -d'@' -f2)
echo "IMAGE_DIGEST=${image_digest}" >> $GITHUB_ENV
- name: Generate SBOM
uses: anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610 # v0
with:
image: quay.io/open-cluster-management/${{ matrix.image-name }}:latest-${{ matrix.arch }}
format: 'spdx-json'
output-file: 'sbom.spdx.json'
- name: Attest
uses: actions/attest-sbom@c604332985a26aa8cf1bdc465b92731239ec6b9e # v4
id: attest
with:
subject-name: quay.io/open-cluster-management/${{ matrix.image-name }}
subject-digest: ${{ env.IMAGE_DIGEST }}
sbom-path: 'sbom.spdx.json'
push-to-registry: false
image-manifest:
name: image manifest
runs-on: ubuntu-latest
strategy:
matrix:
image-name: [ registration-operator, registration, work, placement, addon-manager ]
needs: [ images ]
steps:
- name: checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# Step to install Skopeo
- name: Install Skopeo and jq
run: |
sudo apt-get update
sudo apt-get install -y skopeo jq
- name: create
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login quay.io --username ${{ secrets.DOCKER_USER }} --password-stdin
docker manifest create quay.io/open-cluster-management/${{ matrix.image-name }}:latest \
quay.io/open-cluster-management/${{ matrix.image-name }}:latest-amd64 \
quay.io/open-cluster-management/${{ matrix.image-name }}:latest-arm64
- name: annotate
run: |
docker manifest annotate quay.io/open-cluster-management/${{ matrix.image-name }}:latest \
quay.io/open-cluster-management/${{ matrix.image-name }}:latest-amd64 --arch amd64
docker manifest annotate quay.io/open-cluster-management/${{ matrix.image-name }}:latest \
quay.io/open-cluster-management/${{ matrix.image-name }}:latest-arm64 --arch arm64
- name: push
run: |
docker manifest push quay.io/open-cluster-management/${{ matrix.image-name }}:latest
image_digest_latest=$(skopeo inspect docker://quay.io/open-cluster-management/${{ matrix.image-name }}:latest | jq -r '.Digest')
echo "IMAGE_DIGEST_LATEST=${image_digest_latest}" >> $GITHUB_ENV
- name: Generate SBOM
uses: anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610 # v0
with:
image: quay.io/open-cluster-management/${{ matrix.image-name }}:latest
format: 'spdx-json'
output-file: 'sbom.spdx.json'
- name: Attest
uses: actions/attest-sbom@c604332985a26aa8cf1bdc465b92731239ec6b9e # v4
id: attest
with:
subject-name: quay.io/open-cluster-management/${{ matrix.image-name }}
subject-digest: ${{ env.IMAGE_DIGEST_LATEST }}
sbom-path: 'sbom.spdx.json'
push-to-registry: false
trigger-clusteradm-e2e:
needs: [ images, image-manifest ]
name: trigger clusteradm e2e
runs-on: ubuntu-latest
steps:
- uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4
with:
token: ${{ secrets.OCM_BOT_PAT }}
repository: open-cluster-management-io/clusteradm
event-type: ocm_changes
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'