Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed Aug 27, 2024
1 parent 6c267a7 commit 691b0b6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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') }}
Expand Down
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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"

0 comments on commit 691b0b6

Please sign in to comment.