Skip to content

Commit

Permalink
feat: user docker buildx
Browse files Browse the repository at this point in the history
  • Loading branch information
RouHim committed Aug 19, 2022
1 parent 9834068 commit 9c8b932
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,20 +144,33 @@ jobs:
uses: actions/checkout@v3

- name: Set up QEMU
run: sudo apt install -y qemu-user-static
uses: docker/setup-qemu-action@v2
with:
platforms: linux/${{ matrix.container-image-arch }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build container image
uses: redhat-actions/buildah-build@v2
uses: docker/build-push-action@v3
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ env.TAG }}
archs: ${{ matrix.container-image-arch }}
containerfiles: |
./Containerfile
oci: true

- name: Save container image
run: podman save -o image.tar ${{ env.IMAGE_NAME }}:${{ env.TAG }}
file: Containerfile
tags: ${{ env.IMAGE_NAME }}:${{ env.TAG }}
platforms: linux/${{ matrix.container-image-arch }}
outputs: type=oci,dest=image.tar

# - name: Build container image
# uses: redhat-actions/buildah-build@v2
# with:
# image: ${{ env.IMAGE_NAME }}
# tags: ${{ env.TAG }}
# archs: ${{ matrix.container-image-arch }}
# containerfiles: |
# ./Containerfile
# oci: true
#
# - name: Save container image
# run: podman save -o image.tar ${{ env.IMAGE_NAME }}:${{ env.TAG }}

- name: Upload container image
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 9c8b932

Please sign in to comment.