this will not push to docker hub when project is not alpine based
and is not master.
.build:
stage: build
- only:
- changes:
+ rules:
+ - changes:
- Dockerfile.in
- make_images.sh
- entrypoint.sh
.push:
stage: push
- only:
- changes:
- - Dockerfile.in
- - make_images.sh
- - entrypoint.sh
+ rules:
+ - if: '$CI_PROJECT_PATH == "alpine/docker-abuild" && $CI_COMMIT_BRANCH == "master"'
+ changes:
+ - Dockerfile.in
+ - make_images.sh
+ - entrypoint.sh
push-v3.8:
extends: .push
stage: manifest
variables:
DOCKER_CLI_EXPERIMENTAL: enabled
- only:
- changes:
- - Dockerfile.in
- - make_images.sh
- - entrypoint.sh
+ rules:
+ - if: '$CI_PROJECT_PATH == "alpine/docker-abuild" && $CI_COMMIT_BRANCH == "master"'
+ changes:
+ - Dockerfile.in
+ - make_images.sh
+ - entrypoint.sh
manifest-v3.8:
extends: .manifest
stage: cleanup
script:
- docker system prune --force
- only:
- changes:
- - Dockerfile.in
- - make_images.sh
- - entrypoint.sh
+ rules:
+ - if: '$CI_PROJECT_PATH == "alpine/docker-abuild" && $CI_COMMIT_BRANCH == "master"'
+ changes:
+ - Dockerfile.in
+ - make_images.sh
+ - entrypoint.sh