From 0dbe42752d48f53ec69789933115b053e15ef320 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Thu, 29 Aug 2024 12:12:18 -0700 Subject: [PATCH] feature(workflows): add release builder --- .github/workflows/release.yaml | 52 ++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..3235795 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,52 @@ +name: release +on: + workflow_dispatch: + schedule: + - cron: "0 10 * * *" +permissions: + contents: read + packages: write + id-token: write +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + release: + - 4.18.2 + - 4.18.3 + - 4.19.0 + component: + - xen + - oxenstored + - xen-9pfsd + name: oci build ${{ matrix.component }}-${{ matrix.release }} + steps: + - uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 + with: + egress-policy: audit + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + submodules: recursive + - uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0 + - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + - uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0 + id: push-step + with: + file: ./Dockerfile.${{ matrix.component }} + platforms: linux/amd64,linux/aarch64 + tags: ghcr.io/edera-dev/${{ matrix.component }}:${{ matrix.release }} + build-args: XEN_VERSION=${{ matrix.release }} + push: true + - name: Sign the image + env: + DIGEST: ${{ steps.push-step.outputs.digest }} + TAGS: ghcr.io/edera-dev/${{ matrix.component }}:${{ matrix.release }} + COSIGN_EXPERIMENTAL: "true" + run: cosign sign --yes "${TAGS}@${DIGEST}"