Skip to content

Commit dcfcb5f

Browse files
authored
build: fix docker build workflows (#2028)
* build: always build amd64 and arm64 * build: fix copying Taskfile * chore: bump base image version and pin to bullseye * build: try only build arm64 * build: build amd64 only for now
1 parent 5d20e7f commit dcfcb5f

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

‎.devcontainer/base-image/Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/devcontainers/rust:0.203.7-1
1+
FROM mcr.microsoft.com/devcontainers/rust:0.203.8-1-bullseye
22

33
RUN apt-get update \
44
&& apt-get install -y --no-install-recommends \

‎.github/workflows/devcontainer.yaml‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,11 @@ jobs:
3939
- name: Set up Docker Buildx
4040
uses: docker/setup-buildx-action@v2
4141

42-
- id: set-platforms
42+
- id: set-options
4343
run: |
4444
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
45-
echo "platforms=linux/amd64,linux/arm64" >>$GITHUB_OUTPUT
4645
echo "push=true" >>$GITHUB_OUTPUT
4746
else
48-
echo "platforms=linux/amd64" >>$GITHUB_OUTPUT
4947
echo "push=false" >>$GITHUB_OUTPUT
5048
fi
5149
@@ -54,8 +52,9 @@ jobs:
5452
with:
5553
file: "./.devcontainer/base-image/Dockerfile"
5654
tags: ${{ steps.meta.outputs.tags }}
57-
platforms: ${{ steps.set-platforms.outputs.platforms }}
58-
push: ${{ steps.set-platforms.outputs.push }}
55+
# TODO: add linux/arm64
56+
platforms: linux/amd64
57+
push: ${{ steps.set-options.outputs.push }}
5958
cache-from: |
6059
${{ env.IMAGE_NAME }}
6160
type=gha

‎Dockerfile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ RUN sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/loc
4545

4646
# ========= Set up workdir & copy the taskfile =========
4747
WORKDIR /src
48-
COPY Taskfile.yml .
48+
COPY Taskfile.cargo-tools.yml .
4949

5050
# ========= Install cargo-tools =========
51-
RUN task install-cargo-tools
51+
RUN task -t Taskfile.cargo-tools.yml install
5252

5353
# TODO: currently this doesn't support doing things like running the playground,
5454
# since we don't install hugo & node. Default `apt` doesn't install up-to-date

0 commit comments

Comments
 (0)