diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f4c3a6f..5454d85 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,3 +2,14 @@ include: - project: jonohill/gitlab-templates file: docker.yml ref: 62a7636bf2b74ff39266a90528c4540d3276c1f6 + +variables: + DOCKERHUB_REPO: jonoh/docker-buildx-qemu + +dockerhub-push: + script: + - echo "$DOCKERHUB_PASSWORD" | base64 --decode | docker login -u "$DOCKERHUB_USERNAME" --password-stdin + - docker tag "$CI_REGISTRY_IMAGE" "$DOCKERHUB_REPO:latest" + - docker push "$DOCKERHUB_REPO" + only: + - master diff --git a/readme.md b/readme.md index e463081..03705f1 100644 --- a/readme.md +++ b/readme.md @@ -8,14 +8,14 @@ It's been tested with GitLab CI on gitlab.com, but it should work anywhere that This GitLab example should give you an idea of how to use the image. Dockerfile -``` +```dockerfile FROM alpine RUN echo "Hello, my CPU architecture is $(uname -m)" ``` .gitlab-ci.yml -``` +```yaml variables: DOCKER_HOST: tcp://docker:2375/