Skip to content

Commit

Permalink
refactor(workflows/pr-review-companion): upload to GSC first (#38422)
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner authored Mar 3, 2025
1 parent 5e6db50 commit 49f47b0
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/pr-review-companion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,28 @@ jobs:
cd yari/deployer
poetry install --no-interaction
- name: Authenticate with GCP
if: env.HAS_ARTIFACT
uses: google-github-actions/auth@v2
with:
token_format: access_token
service_account: deploy-mdn-review-content@${{ secrets.GCP_PROJECT_NAME }}.iam.gserviceaccount.com
workload_identity_provider: projects/${{ secrets.WIP_PROJECT_ID }}/locations/global/workloadIdentityPools/github-actions/providers/github-actions

- name: Setup gcloud
if: env.HAS_ARTIFACT
uses: google-github-actions/setup-gcloud@v2

- name: Upload to GCS
if: env.HAS_ARTIFACT
uses: google-github-actions/upload-cloud-storage@v2
with:
path: "build"
destination: "${{ vars.GCP_BUCKET_NAME }}/${{ env.PREFIX }}"
resumable: false
concurrency: 500
process_gcloudignore: false

- name: Deploy and analyze built content
if: env.HAS_ARTIFACT
env:
Expand Down Expand Up @@ -132,25 +154,3 @@ jobs:
--pr-number=$PR_NUMBER \
--diff-file=$BUILD_OUT_ROOT/DIFF \
$BUILD_OUT_ROOT
- name: Authenticate with GCP
if: env.HAS_ARTIFACT
uses: google-github-actions/auth@v2
with:
token_format: access_token
service_account: deploy-mdn-review-content@${{ secrets.GCP_PROJECT_NAME }}.iam.gserviceaccount.com
workload_identity_provider: projects/${{ secrets.WIP_PROJECT_ID }}/locations/global/workloadIdentityPools/github-actions/providers/github-actions

- name: Setup gcloud
if: env.HAS_ARTIFACT
uses: google-github-actions/setup-gcloud@v2

- name: Upload to GCS
if: env.HAS_ARTIFACT
uses: google-github-actions/upload-cloud-storage@v2
with:
path: "build"
destination: "${{ vars.GCP_BUCKET_NAME }}/${{ env.PREFIX }}"
resumable: false
concurrency: 500
process_gcloudignore: false

0 comments on commit 49f47b0

Please # to comment.