Skip to content

Upload files with GCP #2

Upload files with GCP

Upload files with GCP #2

Workflow file for this run

name: Continuous Integration
on:
push:
branches: [main]
pull_request:
branches: [main]
# See https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
xtask:
runs-on: ubuntu-20.04
timeout-minutes: 120
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY_JSON }}
workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
- id: 'upload-file'
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: '/path/to/file'
destination: 'bucket-name'
# Example of using the output
- id: 'uploaded-files'
uses: 'foo/bar@v1'
env:
file: '${{ steps.upload-file.outputs.uploaded }}'