From 691b0b6fc56bcdb5bf833077b587e6ad25c2b492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Tue, 27 Aug 2024 15:37:03 -0700 Subject: [PATCH] Update Dockerfile --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++-- Dockerfile | 8 +++----- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b84d0e6..7e0217f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,6 +68,31 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: dartsdk-linux-x64-${{ github.ref_name }} + + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: dartsdk-linux-ia32-${{ github.ref_name }} + + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: dartsdk-linux-arm64-${{ github.ref_name }} + + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: dartsdk-linux-arm-${{ github.ref_name }} + + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: dartsdk-linux-riscv64-${{ github.ref_name }} + - name: Docker Metadata id: docker-metadata uses: docker/metadata-action@v5 @@ -99,8 +124,6 @@ jobs: - name: Build and push uses: docker/build-push-action@v6 with: - build-args: | - BASEURL=${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.ref_name }} context: . platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/riscv64 push: ${{ !endsWith(github.ref_name, '.beta') && !endsWith(github.ref_name, '.dev') }} diff --git a/Dockerfile b/Dockerfile index c8766a9..d4986be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,10 @@ FROM docker.io/library/alpine -ARG BASEURL - ENV DART_SDK=/usr/lib/dart ENV PATH=$DART_SDK/bin:$PATH -RUN apk add --no-cache \ +RUN --mount=type=bind,source=.,target=/build \ + apk add --no-cache \ ca-certificates \ curl \ git \ @@ -22,6 +21,5 @@ RUN apk add --no-cache \ riscv64) \ SDK_ARCH=riscv64;; \ esac \ - && wget -O- "$BASEURL/dartsdk-linux-$SDK_ARCH-release.tar.gz" \ - | tar -xz \ + && tar -xzf /build/dartsdk-linux-$SDK_ARCH-release.tar.gz \ && mv dart-sdk "$DART_SDK"