docker: build with build-arg for runtime version
Some checks failed
/ push (push) Has been cancelled
Some checks failed
/ push (push) Has been cancelled
This commit is contained in:
parent
857c2dff13
commit
a150f6ee8b
|
@ -18,5 +18,5 @@ jobs:
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: echo "Building version ${{ github.ref_name }}"
|
- run: echo "Building version ${{ github.ref_name }}"
|
||||||
- run: docker build -t git.tigor.web.id/tigor/redmage:${{ github.ref_name }} -t git.tigor.web.id/tigor/redmage:latest .
|
- run: docker build --build-arg REDMAGE_RUNTIME_VERSION=${{ github.ref_name }} -t git.tigor.web.id/tigor/redmage:${{ github.ref_name }} -t git.tigor.web.id/tigor/redmage:latest .
|
||||||
- run: docker image push --all-tags git.tigor.web.id/tigor/redmage
|
- run: docker image push --all-tags git.tigor.web.id/tigor/redmage
|
||||||
|
|
|
@ -15,7 +15,7 @@ COPY go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=web-builder /web/public ./public
|
COPY --from=web-builder /web/public ./public
|
||||||
ENV REDMAGE_RUNTIME_VERSION=unknown
|
ARG REDMAGE_RUNTIME_VERSION=unknown
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build \
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||||
--mount=type=cache,target=/go/pkg/mod \
|
--mount=type=cache,target=/go/pkg/mod \
|
||||||
make build-docker && \
|
make build-docker && \
|
||||||
|
|
Loading…
Reference in a new issue