From 8112cccc04fdf0e042700e78f28ff0c955a7b9f2 Mon Sep 17 00:00:00 2001 From: Marvin Preuss Date: Tue, 24 Sep 2024 12:34:29 +0200 Subject: [PATCH] ci: archlist from taskfile options --- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 1 - Taskfile.yml | 16 ++++++++++------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f927c7..0f7d419 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,4 +11,4 @@ jobs: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v27 - uses: docker/setup-qemu-action@v3 - - run: nix develop . -c task ci-publish GITHUB_USERNAME=${{ github.actor }} GITHUB_PASSWORD=${{ secrets.GITHUB_TOKEN }} GIT_TAG=${{ github.ref_name }} + - run: nix develop . -c task ci-publish GITHUB_USERNAME=${{ github.actor }} GITHUB_PASSWORD=${{ secrets.GITHUB_TOKEN }} GIT_TAG=${{ github.ref_name }} ARCH_LIST=x86_64-linux,aarch64-linux diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 35b469e..aaeff24 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,5 +12,4 @@ jobs: steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v27 - - uses: docker/setup-qemu-action@v3 - run: nix develop . -c task ci diff --git a/Taskfile.yml b/Taskfile.yml index 09ff4ab..dd1be66 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -2,6 +2,7 @@ version: "3" vars: NIX_CMD_BASE: nix develop . -c + ARCH_LIST: x86_64-linux tasks: ci: @@ -35,8 +36,8 @@ tasks: docker-build-all: cmds: - for: - - x86_64-linux - - aarch64-linux + var: ARCH_LIST + split: "," task: docker-build vars: ARCH: "{{.ITEM}}" @@ -44,15 +45,16 @@ tasks: docker-publish-all: cmds: - for: - - x86_64-linux - - aarch64-linux + var: ARCH_LIST + split: "," task: docker-publish vars: ARCH: "{{.ITEM}}" docker-local-import: - vars: - ARCH: '{{default "x86_64-linux" .ARCH}}' + requires: + vars: + - ARCH cmds: - task: docker-build vars: @@ -113,6 +115,8 @@ tasks: test-integration: cmds: - task: docker-local-import + vars: + ARCH: x86_64-linux - | {{.NIX_CMD_BASE}} \ go test -v -race -count=1 ./test/integration/...