Container: Support to pass a fork repository as argument

This commit is contained in:
Badlop 2022-06-03 12:46:00 +02:00
parent 8d94ae4cb0
commit 06a2b1c671
2 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,5 @@
FROM alpine:3.15.4 AS build
ARG REPOSITORY=https://github.com/processone/ejabberd.git
ARG VERSION=master
RUN apk upgrade --update musl \
@ -30,7 +31,7 @@ RUN mix local.hex --force \
WORKDIR ejabberd
RUN git clone https://github.com/processone/ejabberd.git . \
RUN git clone $REPOSITORY . \
&& git checkout $VERSION \
&& mv .github/container/ejabberdctl.template . \
&& ./autogen.sh \

View File

@ -58,6 +58,7 @@ jobs:
uses: docker/build-push-action@v2.10.0
with:
build-args: |
REPOSITORY=https://github.com/${{ github.repository }}.git
VERSION=${{ steps.gitdescribe.outputs.ver }}
cache-from: type=gha
cache-to: type=gha,mode=max