Skip to content

Commit

Permalink
Regen
Browse files Browse the repository at this point in the history
  • Loading branch information
pjreiniger committed Sep 17, 2024
1 parent 3d9d4b0 commit 0bec9ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/actions/setup-build-buddy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,26 @@ description: 'Sets up the build buddy cache to be readonly / writing based on th
inputs:
token:
description: 'Build Buddy API token'
readonly_token:
description: 'Build Buddy API readonly token'
required: true

runs:
using: "composite"
steps:
- name: Setup without key
env:
API_KEY: ${{ inputs.token }}
READONLY_KEY: ${{ inputs.readonly_token }}
if: ${{ env.API_KEY == '' }}
shell: bash
run: |
echo "No API key secret detected, will setup readonly cache"
echo "build:ci --noremote_upload_local_results" > .buildbuddy-auth.rc
echo "build:ci --remote_header=x-buildbuddy-api-key=${{ env.READONLY_KEY }}" >> .buildbuddy-auth.rc
echo "build:ci --noremote_upload_local_results" > tests/.buildbuddy-auth.rc
echo "build:ci --remote_header=x-buildbuddy-api-key=${{ env.READONLY_KEY }}" >> tests/.buildbuddy-auth.rc
- name: Set with key
env:
Expand All @@ -25,3 +33,4 @@ runs:
run: |
echo "API Key detected!"
echo "build:ci --remote_header=x-buildbuddy-api-key=${{ env.API_KEY }}" > .buildbuddy-auth.rc
echo "build:ci --remote_header=x-buildbuddy-api-key=${{ env.API_KEY }}" > tests/.buildbuddy-auth.rc
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
uses: ./.github/actions/setup-build-buddy
with:
token: ${{ secrets.BUILDBUDDY_API_KEY }}
readonly_token: ${{ secrets.BUILDBUDDY_READONLY }}
- run: bazel ${{ matrix.bazel_options }} build -k ${{ matrix.config }} --config=ci @bzlmodrio-ni//...
working-directory: tests
- name: Build and allow failure # TODO Sometimes symlinks don't get created correctly the first time around
Expand Down Expand Up @@ -77,6 +78,7 @@ jobs:
uses: ./.github/actions/setup-build-buddy
with:
token: ${{ secrets.BUILDBUDDY_API_KEY }}
readonly_token: ${{ secrets.BUILDBUDDY_READONLY }}
- name: Build and allow failure # TODO Sometimes symlinks don't get created correctly the first time around
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci || true
working-directory: tests
Expand Down Expand Up @@ -113,6 +115,7 @@ jobs:
uses: ./.github/actions/setup-build-buddy
with:
token: ${{ secrets.BUILDBUDDY_API_KEY }}
readonly_token: ${{ secrets.BUILDBUDDY_READONLY }}
- name: Build and allow failure # TODO Sometimes symlinks don't get created correctly the first time around
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci || true
working-directory: tests
Expand Down Expand Up @@ -150,6 +153,7 @@ jobs:
uses: ./.github/actions/setup-build-buddy
with:
token: ${{ secrets.BUILDBUDDY_API_KEY }}
readonly_token: ${{ secrets.BUILDBUDDY_READONLY }}
- name: Build and allow failure # TODO Sometimes symlinks don't get created correctly the first time around
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci || true
working-directory: tests
Expand Down

0 comments on commit 0bec9ef

Please sign in to comment.