diff --git a/.github/action_templates/build-and-push/action.yaml b/.github/action_templates/build-and-push/action.yaml index a43f5075..4b57f69b 100644 --- a/.github/action_templates/build-and-push/action.yaml +++ b/.github/action_templates/build-and-push/action.yaml @@ -20,9 +20,9 @@ runs: echo "${{ inputs.docker-auth-token }}" | docker login --username awiciroh --password-stdin - name: Build and tag Docker image shell: bash - run: docker build -t awiciroh/ciroh-ngen-image:${{ inputs.github-sha }} -t awiciroh/ciroh-ngen-image-${{ inputs.image-platform }}:latest docker/. + run: docker build -t awiciroh/ciroh-ngen-image:${{ inputs.github-sha }} -t awiciroh/ciroh-ngen-image:latest-${{ inputs.image-platform }} docker/. - name: Push Docker image shell: bash run: | - docker push awiciroh/ciroh-ngen-image-${{ inputs.image-platform }}:${{ inputs.github-sha }} - docker push awiciroh/ciroh-ngen-image-${{ inputs.image-platform }}:latest + docker push awiciroh/ciroh-ngen-image:${{ inputs.github-sha }} + docker push awiciroh/ciroh-ngen-image:latest-${{ inputs.image-platform }} diff --git a/.github/workflows/arm_docker_build.yml b/.github/workflows/docker_image_main_branch_arm.yml similarity index 68% rename from .github/workflows/arm_docker_build.yml rename to .github/workflows/docker_image_main_branch_arm.yml index 33023bb2..4dd95690 100644 --- a/.github/workflows/arm_docker_build.yml +++ b/.github/workflows/docker_image_main_branch_arm.yml @@ -6,10 +6,16 @@ on: - docker/** jobs: build-and-push: - runs-on: macos-latest + runs-on: ubuntu-latest steps: - name: deploy uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: 'arm64,arm' + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: Build and push ARM Docker image for NGEN uses: ./.github/action_templates/build-and-push with: diff --git a/.github/workflows/docker_image_main_branch.yml b/.github/workflows/docker_image_main_branch_x86.yml similarity index 89% rename from .github/workflows/docker_image_main_branch.yml rename to .github/workflows/docker_image_main_branch_x86.yml index 7e2afb7f..0ef25a82 100644 --- a/.github/workflows/docker_image_main_branch.yml +++ b/.github/workflows/docker_image_main_branch_x86.yml @@ -1,4 +1,4 @@ -name: Build and Push Docker image to Docker Hub +name: Build and Push x86 Docker image to Docker Hub on: push: branches: [ main ] diff --git a/.github/workflows/docker_image_manual_build_arm.yml b/.github/workflows/docker_image_manual_build_arm.yml new file mode 100644 index 00000000..4f6e441b --- /dev/null +++ b/.github/workflows/docker_image_manual_build_arm.yml @@ -0,0 +1,21 @@ +name: Manual Build and Push ARM Docker image to Docker Hub +on: + workflow_dispatch: +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: deploy + uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: 'arm64,arm' + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Build and push Docker image + uses: ./.github/action_templates/build-and-push + with: + docker-auth-token: ${{ secrets.DOCKER_AUTH_TOKEN }} + github-sha: ${{ github.sha }} + image-platform: "arm" \ No newline at end of file diff --git a/.github/workflows/docker_image_manual_build.yml b/.github/workflows/docker_image_manual_build_x86.yml similarity index 51% rename from .github/workflows/docker_image_manual_build.yml rename to .github/workflows/docker_image_manual_build_x86.yml index dd0fc2fa..768e4fb1 100644 --- a/.github/workflows/docker_image_manual_build.yml +++ b/.github/workflows/docker_image_manual_build_x86.yml @@ -1,4 +1,4 @@ -name: Manual Build and Push Docker image to Docker Hub +name: Manual Build and Push x86 Docker image to Docker Hub on: workflow_dispatch: jobs: @@ -12,10 +12,4 @@ jobs: with: docker-auth-token: ${{ secrets.DOCKER_AUTH_TOKEN }} github-sha: ${{ github.sha }} - image-platform: "x86" - - name: Build and push Docker image for arm - uses: ./.github/action_templates/build-and-push - with: - docker-auth-token: ${{ secrets.DOCKER_AUTH_TOKEN }} - github-sha: ${{ github.sha }} - image-platform: "arm" \ No newline at end of file + image-platform: "x86" \ No newline at end of file