diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2e6e766..a10906e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -76,8 +76,9 @@ jobs: - name: Prepare local tags id: localreg run: | - echo "mixtag=${{ env.REGISTRY_LOCAL }}/${{ env.MIX_IMAGE_NAME }}:${{ github.ref_name }}" >> $GITHUB_OUTPUT - echo "ecstag=${{ env.REGISTRY_LOCAL }}/${{ env.ECS_IMAGE_NAME }}:${{ github.ref_name }}" >> $GITHUB_OUTPUT + tag="$(echo ${{ github.ref_name }} | sed -e 's|[/]\+|-|g')" + echo "mixtag=${{ env.REGISTRY_LOCAL }}/${{ env.MIX_IMAGE_NAME }}:$tag" >> $GITHUB_OUTPUT + echo "ecstag=${{ env.REGISTRY_LOCAL }}/${{ env.ECS_IMAGE_NAME }}:$tag" >> $GITHUB_OUTPUT - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 diff --git a/ecs/Dockerfile b/ecs/Dockerfile index b491f5a..140a936 100644 --- a/ecs/Dockerfile +++ b/ecs/Dockerfile @@ -1,3 +1,8 @@ +FROM docker.io/golang:1.20-alpine AS api +RUN go install -v \ + github.com/processone/ejabberd-api/cmd/ejabberd@master \ + && mv bin/ejabberd bin/ejabberdapi + FROM ejabberd/mix as builder ARG VERSION ENV VERSION=${VERSION:-latest} \ @@ -93,6 +98,7 @@ RUN apk upgrade --update-cache --no-progress \ WORKDIR $HOME COPY --from=builder /ejabberd/runtime . COPY bin/* bin/ +COPY --from=api /go/bin/ejabberdapi bin/ejabberdapi RUN chmod 755 bin/ejabberdctl bin/ejabberdapi bin/erl COPY --chown=ejabberd:ejabberd conf conf/ ADD --chown=ejabberd:ejabberd https://download.process-one.net/cacert.pem conf/cacert.pem diff --git a/ecs/bin/ejabberdapi b/ecs/bin/ejabberdapi deleted file mode 100755 index 7ae0289..0000000 Binary files a/ecs/bin/ejabberdapi and /dev/null differ