diff --git a/.github/workflows/docker-localnet.yml b/.github/workflows/docker-localnet.yml index fcdafeca..399e7540 100644 --- a/.github/workflows/docker-localnet.yml +++ b/.github/workflows/docker-localnet.yml @@ -13,7 +13,8 @@ jobs: strategy: matrix: docker_image: [emerald-localnet, sapphire-localnet] - runs-on: ubuntu-latest + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v4 @@ -45,6 +46,7 @@ jobs: file: docker/${{ matrix.docker_image }}/Dockerfile tags: | ghcr.io/oasisprotocol/${{ matrix.docker_image }}:local + outputs: type=docker,dest=/tmp/${{ matrix.docker_image }}.tar load: true - name: Test @@ -52,8 +54,14 @@ jobs: working-directory: docker/${{ matrix.docker_image }} run: ./test.sh + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.docker_image }} + file: /tmp/${{ matrix.docker_image }}.tar + - name: Push - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && matrix.os == 'ubuntu-latest' }} uses: docker/build-push-action@v6 with: build-args: | @@ -69,7 +77,7 @@ jobs: org.opencontainers.image.revision=${{ github.sha }} - name: Prune old ghcr.io/oasisprotocol/${{ matrix.docker_image }} images - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && matrix.os == 'ubuntu-latest' }} uses: vlaurin/action-ghcr-prune@v0.6.0 with: token: ${{ secrets.GITHUB_TOKEN }}