Follow up - 0798e7d47e
- 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
This commit is contained in:
parent
48f639ab52
commit
2440dc6a00
3 changed files with 5 additions and 5 deletions
6
.github/docker-image-build.sh
vendored
6
.github/docker-image-build.sh
vendored
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
|
|
2
.github/workflows/build-docker-image.yaml
vendored
2
.github/workflows/build-docker-image.yaml
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue