aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorRoman Hargrave <roman@hargrave.info>2022-09-06 10:59:33 -0700
committerbadlop <badlop@gmail.com>2022-09-07 10:57:55 +0200
commitf542a823090a16e4545a988f6231d6b096600442 (patch)
tree82acc89e21e77850a139fc2939bc5a093567005f /.github
parentFix unix socket support for ejabberd_http (thanks to Simon Lipp)(#3894) (diff)
feat: do not clone repo inside container build
Diffstat (limited to '.github')
-rw-r--r--.github/container/Dockerfile7
-rw-r--r--.github/workflows/container.yml4
2 files changed, 5 insertions, 6 deletions
diff --git a/.github/container/Dockerfile b/.github/container/Dockerfile
index a879a125d..4f4b78970 100644
--- a/.github/container/Dockerfile
+++ b/.github/container/Dockerfile
@@ -1,5 +1,4 @@
FROM alpine:3.15.4 AS build
-ARG REPOSITORY=https://github.com/processone/ejabberd.git
ARG VERSION=master
RUN apk upgrade --update musl \
@@ -29,11 +28,11 @@ RUN apk upgrade --update musl \
RUN mix local.hex --force \
&& mix local.rebar --force
+COPY . ./ejabberd
+
WORKDIR ejabberd
-RUN git clone $REPOSITORY . \
- && git checkout $VERSION \
- && mv .github/container/ejabberdctl.template . \
+RUN mv .github/container/ejabberdctl.template . \
&& ./autogen.sh \
&& ./configure --with-rebar=mix --enable-all \
&& make deps \
diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml
index a246e3640..ccf7dac83 100644
--- a/.github/workflows/container.yml
+++ b/.github/workflows/container.yml
@@ -58,11 +58,11 @@ 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
- context: .github/container
+ context: .
+ file: .github/container/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true