From bd04f1f6b9f17fc8a151b6edcf30a0a1ea6eea04 Mon Sep 17 00:00:00 2001 From: You-Sheng Yang Date: Tue, 9 Apr 2024 22:08:19 +0800 Subject: [PATCH] ci: build multiarched docker images Signed-off-by: You-Sheng Yang --- .github/workflows/ci.yml | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..0bf411cdf8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: Container Images + +on: + pull_request: + branches: + - main + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + matrix: + name: Build Matrix + runs-on: ubuntu-latest + outputs: + full_json: ${{ steps.releases.outputs.json }} + codename_arch" ${{ steps.releases.outputs.codename_arch }} + steps: + - name: Releases Info + id: releases + use: vicamo/actions-library/debian-releases@v1 + - name: Extract codename/arch + env: + FULL_JSON: ${{ steps.releases.outputs.json }} + run: | + json="$(echo "${FULL_JSON}" | \ + jq -c -M '[ .[] as $s | $s.architectures[] | {"codename":$s.codename,"suite":$s.suite,"arch":.} ]')" + echo "::group::Built JSON" + echo "${json}" | jq + echo "::endgroup::" + + echo "codename_arch=${json}" | tee -a "${GITHUB_OUTPUT}" + + container-tarball: + name: Container Tarballs + runs-on: ubuntu-latest + needs: + - matrix + strategy: + matrix: + include: ${{ fromJSON(needs.matrix.outputs.codename_arch) }} + steps: + - run: echo "true"