mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 03:49: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
|
on: push
|
||||||
|
|
||||||
|
@ -44,6 +44,24 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-
|
${{ 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
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: /tmp/.buildx-cache
|
path: /tmp/.buildx-cache
|
||||||
|
@ -51,17 +69,11 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-buildx-
|
${{ runner.os }}-buildx-
|
||||||
|
|
||||||
- run: yarn install --frozen-lockfile
|
|
||||||
|
|
||||||
- run: yarn lint
|
|
||||||
|
|
||||||
- run: yarn test
|
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: docker_meta
|
id: docker_meta
|
||||||
uses: crazy-max/ghaction-docker-meta@v1
|
uses: crazy-max/ghaction-docker-meta@v1
|
||||||
with:
|
with:
|
||||||
images: docker.pkg.github.com/roleypoly/roleypoly/ui
|
images: docker.pkg.github.com/roleypoly/roleypoly/${{matrix.dockerfile}}
|
||||||
tag-sha: true
|
tag-sha: true
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
|
@ -81,7 +93,7 @@ jobs:
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: .hack/dockerfiles/ui.Dockerfile
|
file: .hack/dockerfiles/${{matrix.dockerfile}}.Dockerfile
|
||||||
push: true
|
push: true
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||||
|
|
Loading…
Add table
Reference in a new issue