From 6486b0b1d46c532131e9bb290012cb2f5c273a6b Mon Sep 17 00:00:00 2001 From: Adil Hafeez Date: Tue, 4 Feb 2025 14:46:10 -0800 Subject: [PATCH] latest --- .github/workflows/docker-push.yml | 80 +++++-------------------------- 1 file changed, 12 insertions(+), 68 deletions(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 57d04e49..7c204f0d 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -1,69 +1,10 @@ name: Publish Docker image - on: - # push: - # branches: - # - main # Run tests on pushes to the main branch + push: + branches: + - main # Run tests on pushes to the main branch pull_request: - # branches: - # - main # Run tests on pull requests to the main branch -# release: -# types: [published] - -# jobs: - -# release: -# name: Push Docker image to Docker Hub -# runs-on: ${{ matrix.builder }} -# permissions: -# packages: write -# contents: read -# attestations: write -# id-token: write - -# strategy: -# matrix: -# include: -# - builder: ubuntu-latest -# platform: linux/amd64 -# # - builder: linux-arm64 -# # platform: linux/arm64 - -# steps: -# - name: Check out the repo -# uses: actions/checkout@v4 - -# - name: Log in to Docker Hub -# uses: docker/login-action@v3 -# with: -# username: ${{ secrets.DOCKER_USERNAME }} -# password: ${{ secrets.DOCKER_PASSWORD }} - -# - name: Extract metadata (tags, labels) for Docker -# id: meta -# uses: docker/metadata-action@v5 -# with: -# images: katanemo/archgw-test - -# - name: Set up QEMU -# uses: docker/setup-qemu-action@v3 - -# - name: Set up Docker Buildx -# uses: docker/setup-buildx-action@v3 - -# - name: Build and push Docker image -# id: push -# uses: docker/build-push-action@v6 -# with: -# context: . -# platforms: linux/amd64, linux/arm64 -# file: ./arch/Dockerfile -# push: true -# tags: ${{ steps.meta.outputs.tags }} -# labels: ${{ steps.meta.outputs.labels }} - - jobs: # Build ARM64 image on native ARM64 runner @@ -83,7 +24,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: katanemo/archgw-test + images: katanemo/archgw - name: Build and Push ARM64 Image uses: docker/build-push-action@v5 @@ -111,7 +52,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: katanemo/archgw-test + images: katanemo/archgw - name: Build and Push AMD64 Image uses: docker/build-push-action@v5 @@ -122,6 +63,7 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }}-amd64 + # Combine ARM64 and AMD64 images into a multi-arch manifest create-manifest: runs-on: ubuntu-latest @@ -137,11 +79,13 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: katanemo/archgw-test + images: katanemo/archgw # Correct repository name + tags: | + type=raw,value=latest # Force the tag to be "latest" - name: Create Multi-Arch Manifest run: | - # Use Docker Buildx to combine the images + # Combine the architecture-specific images into a "latest" manifest docker buildx imagetools create -t ${{ steps.meta.outputs.tags }} \ - ${{ steps.meta.outputs.tags }}-arm64 \ - ${{ steps.meta.outputs.tags }}-amd64 + katanemo/archgw:latest-arm64 \ + katanemo/archgw:latest-amd64