Skip to content

build(deps): bump actions/cache from 4.2.3 to 4.2.4 #175

build(deps): bump actions/cache from 4.2.3 to 4.2.4

build(deps): bump actions/cache from 4.2.3 to 4.2.4 #175

name: cni-plugin release
on:
pull_request:
paths:
- .github/workflows/release-cni-plugin.yml
push:
tags: ["cni-plugin/v*"]
permissions:
contents: read
jobs:
meta:
timeout-minutes: 3
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- id: meta
uses: ./.github/actions/version-mode
with:
package: cni-plugin
outputs:
repo: ${{ steps.meta.outputs.repo }}
mode: ${{ steps.meta.outputs.mode }}
version: ${{ steps.meta.outputs.version }}
docker-publish:
needs: meta
runs-on: ubuntu-24.04
timeout-minutes: 25
permissions:
id-token: write # needed for signing the images with GitHub OIDC token
steps:
# Build multi-arch docker images for cni-plugin:
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809
with:
path: ${{ runner.temp }}/.buildx-cache
key: cni-plugin-${{ needs.meta.outputs.mode }}-${{ needs.meta.outputs.version }}
restore-keys: cni-plugin-${{ needs.meta.outputs.mode }}-
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392
- uses: linkerd/dev/actions/setup-tools@v47
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- run: |
just cni-plugin-image='${{ needs.meta.outputs.repo }}:${{ needs.meta.outputs.version }}' \
build-cni-plugin-image \
--cache-from type=local,src="$RUNNER_TEMP/.buildx-cache" \
--cache-to type=local,dest="$RUNNER_TEMP/.buildx-cache",mode=max \
--platform linux/amd64,linux/arm64
- run: just-dev prune-action-cache "$RUNNER_TEMP/.buildx-cache"
# Only publish images on release
- if: needs.meta.outputs.mode == 'release'
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_GHCR_USERNAME }}
password: ${{ secrets.DOCKER_GHCR_PAT }}
- if: needs.meta.outputs.mode == 'release'
run: |
just cni-plugin-image='${{ needs.meta.outputs.repo }}:${{ needs.meta.outputs.version }}' \
build-cni-plugin-image \
--cache-from type=local,src="$RUNNER_TEMP/.buildx-cache" \
--cache-to type=local,dest="$RUNNER_TEMP/.buildx-cache",mode=max \
--platform linux/amd64,linux/arm64 \
--output type=registry
- if: needs.meta.outputs.mode == 'release'
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159
- if: needs.meta.outputs.mode == 'release'
run: cosign sign -y "${{ needs.meta.outputs.repo }}:${{ needs.meta.outputs.version }}"
env:
COSIGN_EXPERIMENTAL: 1
github:
needs: [meta, docker-publish]
timeout-minutes: 5
permissions:
contents: write
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- if: needs.meta.outputs.mode == 'release'
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8
with:
name: cni-plugin ${{ needs.meta.outputs.version }}