name: build bot on: workflow_dispatch: schedule: - cron: "0 0 * * 1" push: branches: - master paths: - bot/** permissions: packages: write jobs: pushArm: name: "yolks:bot_${{ matrix.tag }}" runs-on: ubuntu-latest strategy: fail-fast: false matrix: tag: - parkertron - red - sinusbot - bastion steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 with: buildkitd-flags: --debug - name: Set up QEMU uses: docker/setup-qemu-action@v3 with: platforms: arm64,amd64 - name: Cache Docker layers uses: actions/cache@v3 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} restore-keys: | ${{ runner.os }}-buildx- - uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} - uses: docker/build-push-action@v6 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/${{ github.repository_owner }}/yolks:bot_${{ matrix.tag }} ${{ github.repository_owner == 'pelican-eggs' && format('ghcr.io/parkervcp/yolks:bot_{0}', 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: # registry: ghcr.io # username: ${{ github.repository_owner }} # password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} # - uses: docker/build-push-action@v6 # with: # context: ./bot/${{ matrix.tag }} # file: ./bot/${{ matrix.tag }}/Dockerfile # platforms: linux/amd64 # push: true # tags: | # ${{ github.repository_owner == 'pelican-eggs' && format('ghcr.io/parkervcp/yolks:bot_{0}', matrix.tag) || '' }}