From 06a2b1c671026239bd0e0c4d7832306755195eaf Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 3 Jun 2022 12:46:00 +0200 Subject: [PATCH] Container: Support to pass a fork repository as argument --- .github/container/Dockerfile | 3 ++- .github/workflows/container.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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