Skip to content
Snippets Groups Projects
gitlab-ci.yaml 543 B
include:
  - local: 'shared/earthly/gitlab-earthly-cloud.yaml'

container-build:
  extends: .earthly-cloud
  script:
    - earthly --use-inline-cache --save-inline-cache --ci +images
  rules:
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"'
      variables:
        EARTHLY_PUSH: "true"
      changes:
        paths:
          - images/**/*
    - if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"'
      changes:
        paths:
          - images/**/*
        compare_to: main