diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 68c0256..111bc7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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