diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 0342009..cab38a2 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -5,10 +5,12 @@ on: branches: [ master ] paths: - '*/Dockerfile' + - '.github/workflows/build-test.yml' pull_request: branches: [ master ] paths: - '*/Dockerfile' + - '.github/workflows/build-test.yml' jobs: files: @@ -48,7 +50,13 @@ jobs: - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Set up QEMU + uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0 + - name: Build Docker image ${{ matrix.dockerfile }} run: | cd "$(dirname ${{ matrix.dockerfile }})" - docker build . --file Dockerfile + docker buildx build --platform linux/amd64,linux/arm64 . --file Dockerfile diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 177a80b..cec905e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -45,6 +45,9 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0 @@ -58,6 +61,7 @@ jobs: - name: Build container image uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 with: + platforms: linux/amd64,linux/arm64 push: true context: ${{ github.event.inputs.folderPath }} file: '${{ github.event.inputs.folderPath }}/${{ github.event.inputs.dockerFile }}'