Add dockerhub push job
This commit is contained in:
@ -2,3 +2,14 @@ include:
|
|||||||
- project: jonohill/gitlab-templates
|
- project: jonohill/gitlab-templates
|
||||||
file: docker.yml
|
file: docker.yml
|
||||||
ref: 62a7636bf2b74ff39266a90528c4540d3276c1f6
|
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
|
||||||
|
@ -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.
|
This GitLab example should give you an idea of how to use the image.
|
||||||
|
|
||||||
Dockerfile
|
Dockerfile
|
||||||
```
|
```dockerfile
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
RUN echo "Hello, my CPU architecture is $(uname -m)"
|
RUN echo "Hello, my CPU architecture is $(uname -m)"
|
||||||
```
|
```
|
||||||
|
|
||||||
.gitlab-ci.yml
|
.gitlab-ci.yml
|
||||||
```
|
```yaml
|
||||||
variables:
|
variables:
|
||||||
DOCKER_HOST: tcp://docker:2375/
|
DOCKER_HOST: tcp://docker:2375/
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user