Follow up - 0798e7d47e
- moved from circle ci to github actions. Extract REPO_USER to GitHub secret to make it reusable in Zammad Docker Omnibus and Compose repository.
This commit is contained in:
parent
231a7aaf65
commit
584680e7e4
3 changed files with 6 additions and 5 deletions
3
.github/docker-image-build.sh
vendored
3
.github/docker-image-build.sh
vendored
|
@ -7,7 +7,6 @@ set -o pipefail
|
|||
|
||||
DOCKER_REGISTRY="index.docker.io"
|
||||
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
||||
REPO_USER="zammad"
|
||||
ZAMMAD_VERSION="$(git describe --tags | sed -e 's/-[a-z0-9]\{8,\}.*//g')"
|
||||
|
||||
# dockerhub auth
|
||||
|
@ -21,7 +20,7 @@ cd "${REPO_ROOT}/${DOCKER_GITHUB_REPOSITORY}"
|
|||
|
||||
# shellcheck disable=SC2153
|
||||
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"
|
||||
echo "Build Zammad Docker image ${DOCKER_IMAGE} with version ${ZAMMAD_VERSION} for DockerHubs ${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY} repo"
|
||||
|
||||
if [ "${DOCKER_REPOSITORY}" == "zammad-docker-compose" ]; then
|
||||
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" .
|
||||
|
|
|
@ -2,17 +2,18 @@ name: build-docker-compose-images
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [stable]
|
||||
branches: [stable**]
|
||||
|
||||
jobs:
|
||||
build-docker-compose-images:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKER_GITHUB_REPOSITORY: "zammad-docker-compose"
|
||||
DOCKER_IMAGES: "zammad zammad-elasticsearch zammad-postgresql"
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
DOCKER_REPOSITORY: "zammad-docker-compose"
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_GITHUB_REPOSITORY: "zammad-docker-compose"
|
||||
REPO_USER: ${{ secrets.REPO_USER }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@master
|
||||
|
|
3
.github/workflows/build-docker-image.yaml
vendored
3
.github/workflows/build-docker-image.yaml
vendored
|
@ -8,11 +8,12 @@ jobs:
|
|||
build-docker-image:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKER_GITHUB_REPOSITORY: "zammad-docker"
|
||||
DOCKER_IMAGES: "zammad"
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
DOCKER_REPOSITORY: "zammad"
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_GITHUB_REPOSITORY: "zammad-docker"
|
||||
REPO_USER: ${{ secrets.REPO_USER }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@master
|
||||
|
|
Loading…
Reference in a new issue