diff --git a/.alloy-ci.yml b/.alloy-ci.yml index 344888af..e17973ac 100644 --- a/.alloy-ci.yml +++ b/.alloy-ci.yml @@ -44,7 +44,7 @@ credo + formatter: - mix credo - mix format --check-formatted -image build: +.docker: &docker image: docker:git cache: paths: [] @@ -52,6 +52,9 @@ image build: stage: build services: - docker:dind + +image build: + <<: *docker variables: TAG: test-builder DOCKER_DRIVER: overlay @@ -59,20 +62,31 @@ image build: script: - apk add --update make - make build + only: + - branches + except: + - master + +image release bleeding: + <<: *docker + variables: + TAG: bleeding + DOCKER_DRIVER: overlay + DOCKER_HOST: tcp://docker:2375 + script: + - apk add --update make + - make release + only: + - master image release: - image: docker:git - cache: - paths: [] - before_script: [] - stage: build - services: - - docker:dind + <<: *docker variables: DOCKER_DRIVER: overlay DOCKER_HOST: tcp://docker:2375 script: - apk add --update make - - make release + - make release + - make latest only: - tags diff --git a/Makefile b/Makefile index 7331d7eb..5486dc87 100644 --- a/Makefile +++ b/Makefile @@ -16,11 +16,10 @@ publish: docker push alloyci/alloy_ci:$(TAG) release: - make build ./bin/prepare_credentials + make build cat /tmp/credentials | docker login --username $(DOCKER_HUB_USER) --password-stdin make publish - make latest latest: docker tag alloy_ci:$(TAG) alloyci/alloy_ci:latest