From 08abf49becb905f4f8e363bee7fce5c3ba2a4a2d Mon Sep 17 00:00:00 2001 From: Viktor Kleen Date: Tue, 5 Sep 2023 17:42:47 +0000 Subject: [PATCH] Add a docker manifest test workflow --- .github/workflows/test-docker-manifest.yaml | 29 +++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/test-docker-manifest.yaml diff --git a/.github/workflows/test-docker-manifest.yaml b/.github/workflows/test-docker-manifest.yaml new file mode 100644 index 0000000000..a4459f7d29 --- /dev/null +++ b/.github/workflows/test-docker-manifest.yaml @@ -0,0 +1,29 @@ +name: Upload release artifacts +on: + workflow_dispatch: + inputs: + release_tag: + description: "The release tag to target" + +permissions: + id-token: write + contents: write + packages: write + +jobs: + docker-multiplatform-image: + name: "Assemble multi-platform Docker image" + runs-on: ubuntu-latest + steps: + - name: Log in to registry + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin + - name: Assemble and push image + env: + RELEASE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.release_tag }} + run: | + docker manifest create \ + ghcr.io/tweag/nickel:$RELEASE_TAG \ + ghcr.io/tweag/nickel:$RELEASE_TAG-x86_64 \ + ghcr.io/tweag/nickel:$RELEASE_TAG-arm64 \ + docker manifest push ghcr.io/tweag/nickel:$RELEASE_TAG docker://ghcr.io/tweag/nickel:$RELEASE_TAG +