breakout docker builds into matrix

This commit is contained in:
41666 2020-12-03 10:22:46 -05:00
parent 558207872d
commit 0340693234

View file

@ -1,4 +1,4 @@
name: Bazel Build
name: Roleypoly CI
on: push
@ -44,6 +44,24 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn test
docker_build:
name: Docker Build & Publish
runs-on: ubuntu-latest
needs:
- go_test
- node_test
strategy:
matrix:
dockerfile:
- ui
- bot
steps:
- uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
@ -51,17 +69,11 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx-
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn test
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: docker.pkg.github.com/roleypoly/roleypoly/ui
images: docker.pkg.github.com/roleypoly/roleypoly/${{matrix.dockerfile}}
tag-sha: true
- name: Set up Docker Buildx
@ -81,7 +93,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
file: .hack/dockerfiles/ui.Dockerfile
file: .hack/dockerfiles/${{matrix.dockerfile}}.Dockerfile
push: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache