Commit 8f3ba7c4 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Use only:changes to suppress unnecessary builds

parent 8cfeb619
Loading
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -16,6 +16,15 @@ before_script:

.build: &build
  stage: build
  only: &build-only
    changes:
    - Dockerfile
    - entrypoint.sh
    - nginx.conf
    - opcache.ini
    - scripts/*
    - wp-config.php
    - wp.sh
  script:
  - docker build .
    --pull=true
@@ -35,7 +44,9 @@ build-nginx:

.push-tags: &push-tags
  stage: deploy
  only: [master, develop]
  only:
    <<: *build-only
    refs: [master, develop]
  script: |
    BUILD_REPO=${CI_REGISTRY_IMAGE}/${CI_JOB_NAME#push-}/build:${CI_PIPELINE_ID}
    DEPLOY_REPO=${CI_REGISTRY_IMAGE}/${CI_JOB_NAME#push-}