mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
breakout docker builds into matrix
This commit is contained in:
parent
558207872d
commit
0340693234
1 changed files with 21 additions and 9 deletions
30
.github/workflows/build.yml
vendored
30
.github/workflows/build.yml
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue