Skip to content

Commit

Permalink
enable push to dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
usrbinkat committed Sep 25, 2024
1 parent e66121e commit d41bc04
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Docker Hub Container Registry
uses: docker/login-action@v3
id: docker-login-dockerhub
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWD }}

- name: repository_owner to lower case
uses: Entepotenz/change-string-case-action-min-dependencies@v1
id: string-owner-to-lower
Expand All @@ -77,7 +85,7 @@ jobs:
context: docker
file: docker/slim/Dockerfile
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/containercraft/konductor:slim,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"
tags: "docker.io/containercraft/konductor:slim,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"

- name: Build and Push Image devcontainer:slim-node
uses: docker/build-push-action@v5
Expand All @@ -90,7 +98,7 @@ jobs:
context: docker/slim-node
file: docker/slim-node/Dockerfile
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/containercraft/konductor:slim-node,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-node,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"
tags: "docker.io/containercraft/konductor:slim-node,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-node,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"

- name: Build and Push Image devcontainer:slim-python
uses: docker/build-push-action@v5
Expand All @@ -103,7 +111,7 @@ jobs:
context: docker/slim-python
file: docker/slim-python/Dockerfile
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/containercraft/konductor:slim-python,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-python,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"
tags: "docker.io/containercraft/konductor:slim-python,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-python,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"

- name: Build and Push Image devcontainer:slim-golang
uses: docker/build-push-action@v5
Expand All @@ -116,7 +124,7 @@ jobs:
context: docker/slim-golang
file: docker/slim-golang/Dockerfile
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/containercraft/konductor:slim-go,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-go,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"
tags: "docker.io/containercraft/konductor:slim-go,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-go,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"

- name: Build and Push Image devcontainer:slim-dotnet
uses: docker/build-push-action@v5
Expand All @@ -129,7 +137,7 @@ jobs:
context: docker/slim-dotnet
file: docker/slim-dotnet/Dockerfile
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/containercraft/konductor:slim-dotnet,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-dotnet,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"
tags: "docker.io/containercraft/konductor:slim-dotnet,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-dotnet,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"

- name: Build and Push Image devcontainer:slim-all
uses: docker/build-push-action@v5
Expand All @@ -142,7 +150,7 @@ jobs:
context: docker/slim-all
file: docker/slim-all/Dockerfile
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/containercraft/konductor:slim-all,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-all,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"
tags: "docker.io/containercraft/konductor:slim-all,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-all,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"

- name: Build and Push Image devcontainer:hugo
uses: docker/build-push-action@v5
Expand All @@ -155,7 +163,7 @@ jobs:
context: docker/hugo
file: docker/hugo/Dockerfile
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/containercraft/konductor:hugo,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:hugo,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"
tags: "docker.io/containercraft/konductor:hugo,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:hugo,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"

- name: Build and Push Image devcontainer:base
uses: docker/build-push-action@v5
Expand All @@ -168,7 +176,7 @@ jobs:
context: docker/base
file: docker/base/Dockerfile
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/containercraft/konductor:base,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:base,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"
tags: "docker.io/containercraft/konductor:base,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:base,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"

- name: Build and Push Image devcontainer:dind
uses: docker/build-push-action@v5
Expand All @@ -181,7 +189,7 @@ jobs:
context: docker/docker-in-docker
file: docker/docker-in-docker/Dockerfile
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/containercraft/konductor:dind,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:dind,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"
tags: "docker.io/containercraft/konductor:dind,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:dind,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"

- name: Build and Push Image devcontainer:extra
uses: docker/build-push-action@v5
Expand All @@ -194,7 +202,7 @@ jobs:
context: docker/extra
file: docker/extra/Dockerfile
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/containercraft/konductor:extra,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:extra,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:latest,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"
tags: "docker.io/containercraft/konductor:extra,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:extra,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:latest,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"

- name: Build and Push Image devcontainer:code-server
uses: docker/build-push-action@v5
Expand All @@ -207,4 +215,4 @@ jobs:
context: docker/code-server
file: docker/code-server/Dockerfile
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/containercraft/konductor:code-server,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:code-server,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"
tags: "docker.io/containercraft/konductor:code-server,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:code-server,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}"

0 comments on commit d41bc04

Please sign in to comment.