mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-16 17:49:09 +00:00
chore: prettier
This commit is contained in:
parent
ccf89d8480
commit
70fa51d4a1
67 changed files with 1811 additions and 1838 deletions
94
.github/workflows/build.yml
vendored
94
.github/workflows/build.yml
vendored
|
@ -3,57 +3,57 @@ name: Bazel Build
|
|||
on: push
|
||||
|
||||
jobs:
|
||||
bazel_build:
|
||||
name: Bazel Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
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: 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: 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 \
|
||||
--stamp \
|
||||
--workspace_status_command hack/workspace_status.sh \
|
||||
//src/...
|
||||
- name: Test
|
||||
run: |
|
||||
"${GITHUB_WORKSPACE}/bin/bazel" test \
|
||||
--stamp \
|
||||
--workspace_status_command hack/workspace_status.sh \
|
||||
//src/...
|
||||
|
||||
- name: Docker Login
|
||||
run: |
|
||||
echo ${{github.token}} | docker login -u ${{github.actor}} --password-stdin docker.pkg.github.com
|
||||
- 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 \
|
||||
--stamp \
|
||||
--workspace_status_command hack/workspace_status.sh
|
||||
- name: Publish Artifacts
|
||||
run: |
|
||||
"${GITHUB_WORKSPACE}/bin/bazel" query //src/... |\
|
||||
grep +publish |\
|
||||
xargs -l1 "${GITHUB_WORKSPACE}/bin/bazel" run \
|
||||
--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: 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
|
||||
- name: Upload Artifact Manifest
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: manifest.json
|
||||
path: manifest.json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue