aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2022-06-03 12:46:00 +0200
committerBadlop <badlop@process-one.net>2022-06-09 11:57:49 +0200
commit06a2b1c671026239bd0e0c4d7832306755195eaf (patch)
tree16a24dc3bfbdc0ddb61b3ff74755e5965de32ff8 /.github
parentContainer: Fix build instructions (diff)
Container: Support to pass a fork repository as argument
Diffstat (limited to '.github')
-rw-r--r--.github/container/Dockerfile3
-rw-r--r--.github/workflows/container.yml1
2 files changed, 3 insertions, 1 deletions
diff --git a/.github/container/Dockerfile b/.github/container/Dockerfile
index d3537b23d..629985b8d 100644
--- a/.github/container/Dockerfile
+++ b/.github/container/Dockerfile
@@ -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 \
diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml
index 8ae2c6873..7256058e5 100644
--- a/.github/workflows/container.yml
+++ b/.github/workflows/container.yml
@@ -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