Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions .github/workflows/pr-review-companion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ jobs:
review:
environment: review
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.pull_requests[0].number
env:
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
PREFIX: pr${{ github.event.workflow_run.pull_requests[0].number }}
steps:
- name: "Download artifact"
- name: Download artifact
uses: actions/download-artifact@v5
with:
pattern: build
Expand All @@ -44,11 +47,7 @@ jobs:
- name: Check for artifacts
id: check
if: hashFiles('build/') != ''
run: |
echo "HAS_ARTIFACT=true" >> "$GITHUB_OUTPUT"
PR_NUMBER=`cat build/NR | tr -dc '0-9'`
echo "PR_NUMBER=$PR_NUMBER" >> "$GITHUB_OUTPUT"
echo "PREFIX=pr$PR_NUMBER" >> "$GITHUB_OUTPUT"
run: echo "HAS_ARTIFACT=true" >> "$GITHUB_OUTPUT"

- name: Authenticate with GCP
if: steps.check.outputs.HAS_ARTIFACT
Expand All @@ -67,7 +66,7 @@ jobs:
uses: google-github-actions/upload-cloud-storage@v2
with:
path: "build"
destination: "${{ vars.GCP_BUCKET_NAME }}/${{ steps.check.outputs.PREFIX }}"
destination: "${{ vars.GCP_BUCKET_NAME }}/${{ env.PREFIX }}"
resumable: false
headers: |-
cache-control: no-store
Expand Down Expand Up @@ -99,8 +98,6 @@ jobs:
if: steps.check.outputs.HAS_ARTIFACT
env:
BUILD_OUT_ROOT: ${{ github.workspace }}/build
PREFIX: ${{ steps.check.outputs.PREFIX }}
PR_NUMBER: ${{ steps.check.outputs.PR_NUMBER }}
working-directory: content
run: |
echo "Pull request:"
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ jobs:
echo "Disk usage size of the build"
du -sh $BUILD_OUT_ROOT

# Save the PR number into the build
echo ${{ github.event.number }} > ${BUILD_OUT_ROOT}/NR

# Download the raw diff blob and store that inside the build
# directory.
# The purpose of this is for the PR Review Companion to later
Expand Down