Skip to content

Commit

Permalink
Version the destination bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Mar 20, 2023
1 parent f2204b0 commit d34609b
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ jobs:
contents: "read"
id-token: "write"

if: github.ref == 'refs/heads/main' || github.event.inputs.force_update_web_build
#if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || github.event.inputs.force_update_web_build
runs-on: ubuntu-latest-16-cores
container:
image: rerunio/ci_docker:0.6
Expand Down Expand Up @@ -281,14 +281,26 @@ jobs:
- id: "auth"
uses: google-github-actions/auth@v1
with:
workload_identity_provider: "projects/11779445316/locations/global/workloadIdentityPools/rerun-github-actions-ci/providers/github"
service_account: "github-actions-ci@rerun-open.iam.gserviceaccount.com"
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}

- id: "upload-folder"
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${{github.sha}} | cut -c1-8`" >> $GITHUB_ENV

- name: "Upload web-viewer"
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_viewer"
destination: "rerun-web-viewer/commit/${SHORT_SHA}"
parent: false

- name: "Upload web-viewer (tagged)"
if: startsWith(github.ref, 'refs/tags/v')
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_viewer"
destination: "rerun-web-viewer"
destination: "rerun-web-viewer/version/${{github.ref_name}}"
parent: false

# ---------------------------------------------------------------------------

Expand Down

0 comments on commit d34609b

Please sign in to comment.