-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
36 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: v1.0 | ||
name: Push to Dockerhub - elixir ${{parameters.ELIXIR_IMAGE_TAG}} | ||
agent: | ||
machine: | ||
type: e1-standard-2 | ||
os_image: ubuntu1804 | ||
blocks: | ||
- name: Push | ||
task: | ||
jobs: | ||
- name: build and push parametrised versions | ||
commands: | ||
- checkout | ||
- docker login | ||
- make setup | ||
- make build ELIXIR_IMAGE_TAG=$ELIXIR_IMAGE_TAG | ||
- make push ELIXIR_IMAGE_TAG=$ELIXIR_IMAGE_TAG | ||
secrets: | ||
- name: dockerhub-robot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
FROM elixir:1.13.4-alpine | ||
MAINTAINER Rendered Text <[email protected]> | ||
ARG ELIXIR_IMAGE_TAG=1.13.4-alpine | ||
FROM elixir:$ELIXIR_IMAGE_TAG | ||
|
||
ENV MIX_ENV test | ||
|
||
RUN apk add --update git && mix local.hex --force | ||
|
||
RUN mix archive.install hex bunt 0.2.0 --force | ||
RUN mix archive.install hex bunt --force | ||
RUN mix archive.install hex poison --force | ||
RUN mix archive.install hex credo 1.6.5 --force | ||
RUN mix archive.install hex credo --force | ||
|
||
RUN mkdir -p /home/credo | ||
ADD .credo.exs /home/credo/.credo.exs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
.PHONY: build push | ||
|
||
DOCKER_IMAGE_TAG=$(shell git rev-parse --short HEAD) | ||
ELIXIR_IMAGE_TAG?=1.13.4-alpine | ||
|
||
build: | ||
docker build -t renderedtext/credo . | ||
docker build -t renderedtext/credo --build-arg ELIXIR_IMAGE_TAG=elixir-$(ELIXIR_IMAGE_TAG) . | ||
|
||
push: | ||
docker tag renderedtext/credo:latest renderedtext/credo:$(DOCKER_IMAGE_TAG) | ||
docker push renderedtext/credo:$(DOCKER_IMAGE_TAG) | ||
docker push renderedtext/credo:latest | ||
docker tag renderedtext/credo:latest renderedtext/credo:elixir-$(ELIXIR_IMAGE_TAG) | ||
docker push renderedtext/credo:elixir-$(ELIXIR_IMAGE_TAG) | ||
|
||
setup: | ||
docker run --privileged --rm tonistiigi/binfmt --install all | ||
docker buildx create --name mybuilder | ||
docker buildx use mybuilder | ||
docker buildx use mybuilder |