Skip to content

Commit

Permalink
Improve caching
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAwesome committed Nov 27, 2024
1 parent d799355 commit 6e04de5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions misc/act-docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM archlinux:base-devel
ENV CI true
FROM archlinux:base-devel AS base
ENV CI=true
RUN pacman -Syu --noconfirm git flatpak fontconfig p7zip
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN ln -sf /root/.cargo/bin/cargo /usr/bin/cargo
Expand Down Expand Up @@ -33,7 +33,10 @@ WORKDIR /work
# Otherwise, flatpak list will fail
RUN flatpak list

FROM base AS gitclone
RUN git clone https://github.com/MrAwesome/decktricks.git

FROM gitclone AS buildetc
#RUN apt-get -y install gcc pkg-config libssl-dev
WORKDIR /work/decktricks
RUN cargo build
Expand Down
6 changes: 4 additions & 2 deletions scripts/build_local_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

set -euxo pipefail

cd "$(dirname "$0")"/../misc/act-docker

# To avoid needing sudo to run docker commands, run this and then log out and back in:
# sudo usermod -aG docker $USER

# To install buildx on Arch:
# sudo pacman -S docker-buildx

cd "$(dirname "$0")"/../misc/act-docker
docker build -t decktricks-act .
# NOTE: this uses the github repo, NOT the local repo.
docker buildx build --no-cache-filter="gitclone" -t decktricks-act .

0 comments on commit 6e04de5

Please sign in to comment.