ci(bots): ARM64 support and layer caching (#26)
This commit is contained in:

committed by
GitHub

parent
7f9cd3c581
commit
eaedc9408a
50
.github/workflows/bot.yml
vendored
50
.github/workflows/bot.yml
vendored
@@ -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:
|
||||
|
Reference in New Issue
Block a user