Skip to content

Commit

Permalink
METAL-3587 Update dockerhub username (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
allanger authored Jun 7, 2022
1 parent 4c35b3a commit 859b4ee
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/image-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [published, edited]

env:
dockerhub_user: kloeckneri
dockerhub_namespace: kloeckneri
manufacturer: kloeckner-i
product_name: db-operator
go_version: "1.17"
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Login to Dockerhub
uses: docker/login-action@v1
with:
username: ${{ env.dockerhub_user }}
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set action link variable
Expand All @@ -66,8 +66,8 @@ jobs:
file: Dockerfile-ci
platforms: ${{ env.go_os }}/${{ matrix.docker_arch }}
tags: |
${{ env.dockerhub_user }}/${{ env.product_name }}:latest-${{ matrix.go_arch }}
${{ env.dockerhub_user }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-${{ matrix.go_arch }}
${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest-${{ matrix.go_arch }}
${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-${{ matrix.go_arch }}
ghcr.io/${{ env.manufacturer }}/${{ env.product_name }}:latest-${{ matrix.go_arch }}
ghcr.io/${{ env.manufacturer }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-${{ matrix.go_arch }}
labels: |
Expand Down Expand Up @@ -117,23 +117,23 @@ jobs:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
username: ${{ env.dockerhub_user }}
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Create a docker manifest for a versioned container
run: |
docker manifest create ${{ env.dockerhub_user }}/${{ env.product_name }}:${{ github.event.release.tag_name }} \
--amend ${{ env.dockerhub_user }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-amd64 \
--amend ${{ env.dockerhub_user }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-arm64
docker manifest create ${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }} \
--amend ${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-amd64 \
--amend ${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-arm64
- name: Create a manifest for the latest container
run: |
docker manifest create ${{ env.dockerhub_user }}/${{ env.product_name }}:latest \
--amend ${{ env.dockerhub_user }}/${{ env.product_name }}:latest-amd64 \
--amend ${{ env.dockerhub_user }}/${{ env.product_name }}:latest-arm64
docker manifest create ${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest \
--amend ${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest-amd64 \
--amend ${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest-arm64
- name: Push the manifest
run: |
docker manifest push ${{ env.dockerhub_user }}/${{ env.product_name }}:${{ github.event.release.tag_name }}
docker manifest push ${{ env.dockerhub_user }}/${{ env.product_name }}:latest
docker manifest push ${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }}
docker manifest push ${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest

0 comments on commit 859b4ee

Please sign in to comment.