diff --git a/.github/workflows/bot.yml b/.github/workflows/bot.yml index 64b883f..6eae438 100644 --- a/.github/workflows/bot.yml +++ b/.github/workflows/bot.yml @@ -9,14 +9,13 @@ on: paths: - bot/** jobs: - push: + pushArm: name: "yolks:bot_${{ matrix.tag }}" runs-on: ubuntu-latest strategy: fail-fast: false matrix: tag: - - bastion - parkertron - red - sinusbot @@ -24,7 +23,52 @@ jobs: - uses: actions/checkout@v2 - uses: docker/setup-buildx-action@v1 with: - version: "v0.5.1" + version: "v0.7.0" + buildkitd-flags: --debug + - name: Set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: arm64,amd64 + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.REGISTRY_TOKEN }} + - uses: docker/build-push-action@v2 + with: + context: ./bot/${{ matrix.tag }} + file: ./bot/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new + push: true + tags: | + ghcr.io/parkervcp/yolks:bot_${{ matrix.tag }} + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + pushAmd: + name: "yolks:bot_${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - bastion + steps: + - uses: actions/checkout@v2 + - uses: docker/setup-buildx-action@v1 + with: + version: "v0.7.0" buildkitd-flags: --debug - uses: docker/login-action@v1 with: