v3/.github/workflows/build.yml
Katalina 89f237cf22
feat: Add majority of design system components, build system fixes (#11)
* feat(design-system): pre-port of roleypoly/ui

* feat(design-system): port molecules

* chore(design-system): prettier

* feat(design-system): add intro card and MDX components

* fix(common/utils): hack fixtures test data moved to design-system, update accordingly

* chore: document protoReflection.ts

* fix(design-system): some molecules missed the magic fuckery

* ci: keep going on bazel test failures

* fix(design-system): server masthead molecule missed the magic fuckery

* chore: fix ts paths

* chore: fix docker publisher

* chore: fix docker publisher names

* chore(discord-bot): fix publisher

* chore(discord-bot): fix publisher
2020-10-14 22:33:01 -04:00

61 lines
2.3 KiB
YAML

name: Bazel Build
on: push
jobs:
bazel_build:
name: Bazel Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Mount bazel cache
uses: actions/cache@v2.1.1
with:
path: '/home/runner/.cache/bazel'
key: bazel
- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.1.0/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
- name: Test
run: |
"${GITHUB_WORKSPACE}/bin/bazel" test \
-k -c opt \
--stamp \
--workspace_status_command hack/workspace_status.sh --\
//src/... //hack/... -//hack/dev-container/...
- name: Docker Login
run: |
echo ${{github.token}} | docker login -u ${{github.actor}} --password-stdin docker.pkg.github.com
- name: Publish Artifacts
run: |
"${GITHUB_WORKSPACE}/bin/bazel" query //src/... |\
grep +publish |\
xargs -l1 "${GITHUB_WORKSPACE}/bin/bazel" run \
-c opt \
--stamp \
--workspace_status_command hack/workspace_status.sh
- name: Write Artifact Manifest
run: |
artifacts=$(${GITHUB_WORKSPACE}/bin/bazel query //src/... | grep +publish)
publishedServices=${artifacts//$'//src/'/}
publishedServices=${publishedServices//$':+publish'/}
manifestJSON='{"services": {}}'
for svc in $publishedServices; do
manifestJSON=$(echo $manifestJSON | jq ".services+={\"$svc\":\"$(cat bazel-bin/src/$svc/+publish.digest)\"}")
done
echo $manifestJSON > manifest.json
- name: Upload Artifact Manifest
uses: actions/upload-artifact@v2
with:
name: manifest.json
path: manifest.json