]> git.sev.monster Git - docker-abuild.git/commitdiff
ci: switch to using rules
authorCarlo Landmeter <clandmeter@alpinelinux.org>
Wed, 17 Jun 2020 19:55:30 +0000 (21:55 +0200)
committerCarlo Landmeter <clandmeter@alpinelinux.org>
Wed, 17 Jun 2020 20:13:26 +0000 (22:13 +0200)
this will not push to docker hub when project is not alpine based
and is not master.

.gitlab-ci.yml

index a6099d301a4ecb922db787a87b4fb1b278399d2e..2e624421e1545800647bf84387c214337be85394 100644 (file)
@@ -10,8 +10,8 @@ stages:
 
 .build:
   stage: build
-  only:
-    changes:
+  rules:
+    changes:
       - Dockerfile.in
       - make_images.sh
       - entrypoint.sh
@@ -45,11 +45,12 @@ build-edge:
 
 .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
@@ -82,11 +83,12 @@ push-edge:
   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
@@ -119,9 +121,10 @@ cleanup:
   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
 
This page took 0.051036 seconds and 4 git commands to generate.