Skip to content

Commit

Permalink
Merge pull request #13 from metal-stack/publish-on-docker-hub
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 authored Nov 26, 2020
2 parents 80ab644 + 777c072 commit f5d4ab1
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/master-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ jobs:
username: ${{ secrets.DOCKER_REGISTRY_USER }}
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}

- name: Docker Login
uses: docker/login-action@v1
with:
registry: docker.io
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- uses: olegtarasov/get-tag@v1
id: tagName

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ jobs:
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
if: steps.fork.outputs.is_fork_pr == 'false'

- name: Docker Login
uses: docker/login-action@v1
with:
registry: docker.io
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
if: steps.fork.outputs.is_fork_pr == 'false'

- name: Build the Docker images
run: |
export GITHUB_TAG_NAME=pr-${GITHUB_HEAD_REF##*/}
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ jobs:
username: ${{ secrets.DOCKER_REGISTRY_USER }}
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}

- name: Docker Login
uses: docker/login-action@v1
with:
registry: docker.io
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Build the Docker images
run: |
export GITHUB_TAG_NAME=${GITHUB_REF##*/}
Expand Down
6 changes: 6 additions & 0 deletions metal-deployment/base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,11 @@ dockerimage:

.PHONY: dockerpush
dockerpush:
docker tag ghcr.io/metal-stack/metal-deployment-base:${DOCKER_TAG} metalstack/metal-deployment-base:${DOCKER_TAG}
docker tag ghcr.io/metal-stack/metal-deployment-base:${DOCKER_TAG}-vagrant metalstack/metal-deployment-base:${DOCKER_TAG}-vagrant

docker push ghcr.io/metal-stack/metal-deployment-base:${DOCKER_TAG}
docker push ghcr.io/metal-stack/metal-deployment-base:${DOCKER_TAG}-vagrant

docker push metalstack/metal-deployment-base:${DOCKER_TAG}
docker push metalstack/metal-deployment-base:${DOCKER_TAG}-vagrant

0 comments on commit f5d4ab1

Please sign in to comment.