diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index fde579e..68f74fa 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,6 +1,7 @@ name: Build And Push Docker Image on: + workflow_dispatch: push: # Sequence of patterns matched against refs/tags tags: @@ -13,7 +14,7 @@ jobs: packages: write contents: read steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set time zone uses: szenius/set-timezone@v1.0 with: @@ -29,7 +30,7 @@ jobs: # password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GHCR - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -37,7 +38,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v4 with: images: | ghcr.io/${{ github.repository }} @@ -51,14 +52,19 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . + platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }}