Skip to content

Commit

Permalink
push to docker.io and ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmzj committed Jun 23, 2024
1 parent 86d7d67 commit 08d4dd7
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/build_and_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/easzlab/kubeasz
tags: ${{ matrix.version }}

- name: Set up QEMU
Expand All @@ -38,20 +37,27 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to the Container registry
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to the GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
build-args: KUBEASZ_VER=${{ matrix.version }}
context: .
tags: ${{ steps.meta.outputs.tags }}
tags: |
easzlab/kubeasz:${{ steps.meta.outputs.tags }}
ghcr.io/easzlab/kubeasz:${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true

0 comments on commit 08d4dd7

Please sign in to comment.