From 2440dc6a007d4376a4e5adf866977eb07369a93c Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Thu, 5 Mar 2020 11:55:11 +0100 Subject: [PATCH] Follow up - 0798e7d47ed2505ea43dccdb9c1ef867d700f720 - moved from circle ci to github actions. Used ENV GITHUB_REPOSITORY collides with GitHub actions ENV and gets overwritten. Ref: https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables --- .github/docker-image-build.sh | 6 +++--- .github/workflows/build-docker-compose-images.yaml | 2 +- .github/workflows/build-docker-image.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/docker-image-build.sh b/.github/docker-image-build.sh index 2bed228d2..f53c41583 100755 --- a/.github/docker-image-build.sh +++ b/.github/docker-image-build.sh @@ -14,10 +14,10 @@ ZAMMAD_VERSION="$(git describe --tags | sed -e 's/-[a-z0-9]\{8,\}.*//g')" echo "${DOCKER_PASSWORD}" | docker login --username="${DOCKER_USERNAME}" --password-stdin # clone docker repo -git clone https://github.com/"${REPO_USER}"/"${GITHUB_REPOSITORY}" +git clone https://github.com/"${REPO_USER}"/"${DOCKER_GITHUB_REPOSITORY}" # enter dockerfile dir -cd "${REPO_ROOT}/${GITHUB_REPOSITORY}" +cd "${REPO_ROOT}/${DOCKER_GITHUB_REPOSITORY}" for DOCKER_IMAGE in ${DOCKER_IMAGES}; do echo "Build Zammad Docker image ${DOCKER_IMAGE} with version ${ZAMMAD_VERSION} for DockerHubs ${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE} repo" @@ -26,7 +26,7 @@ for DOCKER_IMAGE in ${DOCKER_IMAGES}; do docker build --pull --no-cache --build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" -t ${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE} -t ${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-latest -t ${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-${ZAMMAD_VERSION} -f containers/${DOCKER_IMAGE}/Dockerfile . docker push ${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-latest else - docker build --pull --no-cache --build-arg BUILD_DATE="$(date -u +”%Y-%m-%dT%H:%M:%SZ”)" -t ${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY}:latest -t ${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY}:${ZAMMAD_VERSION} . + docker build --pull --no-cache --build-arg BUILD_DATE="$(date -u +”%Y-%m-%dT%H:%M:%SZ”)" -t ${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY}:latest -t ${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY}:${ZAMMAD_VERSION} . fi docker push ${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE} docker push ${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-${ZAMMAD_VERSION} diff --git a/.github/workflows/build-docker-compose-images.yaml b/.github/workflows/build-docker-compose-images.yaml index 57fd67ce6..a673fc1bb 100644 --- a/.github/workflows/build-docker-compose-images.yaml +++ b/.github/workflows/build-docker-compose-images.yaml @@ -12,7 +12,7 @@ jobs: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_REPOSITORY: "zammad-docker-compose" DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - GITHUB_REPOSITORY: "zammad-docker-compose" + DOCKER_GITHUB_REPOSITORY: "zammad-docker-compose" steps: - name: Checkout code uses: actions/checkout@master diff --git a/.github/workflows/build-docker-image.yaml b/.github/workflows/build-docker-image.yaml index 940f7d249..0d9c76254 100644 --- a/.github/workflows/build-docker-image.yaml +++ b/.github/workflows/build-docker-image.yaml @@ -12,7 +12,7 @@ jobs: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_REPOSITORY: "zammad" DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - GITHUB_REPOSITORY: "zammad-docker" + DOCKER_GITHUB_REPOSITORY: "zammad-docker" steps: - name: Checkout code uses: actions/checkout@master