Skip to content

Commit

Permalink
#51: Using branch when building prod image
Browse files Browse the repository at this point in the history
  • Loading branch information
dooman87 committed Jul 28, 2024
1 parent 13d03f9 commit fa367e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ jobs:
push: false
load: true
tags: transformimgs
build-args: |
"BRANCH=${{ GITHUB_HEAD_REF }}"
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
-
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM dpokidov/imagemagick:7.1.1-31-2-bookworm AS build

ARG BRANCH=main

RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
g++ \
gcc \
Expand Down Expand Up @@ -107,7 +109,8 @@ WORKDIR $GOPATH

RUN mkdir -p /go/src/github.com/Pixboost/
WORKDIR /go/src/github.com/Pixboost/
RUN git clone https://github.com/Pixboost/transformimgs.git

RUN git clone --branch $BRANCH --single-branch https://github.com/Pixboost/transformimgs.git

WORKDIR /go/src/github.com/Pixboost/transformimgs/illustration

Expand Down

0 comments on commit fa367e7

Please sign in to comment.