🌐
GitHub
github.com › google-github-actions › setup-gcloud
GitHub - google-github-actions/setup-gcloud: A GitHub Action for installing and configuring the gcloud CLI. · GitHub
Configures the Google Cloud SDK in the GitHub Actions environment.
Starred by 1.9K users
Forked by 527 users
Languages   TypeScript 95.3% | JavaScript 4.7%
🌐
GitHub
github.com › google-github-actions › auth
GitHub - google-github-actions/auth: A GitHub Action for authenticating to Google Cloud. · GitHub
Workload Identity Federation is ... invocation and permissions on Google Cloud. There are three ways to set up this GitHub Action to authenticate to Google Cloud: ... The gsutil command will not use the credentials exported by this GitHub Action....
Starred by 1.3K users
Forked by 295 users
Languages   TypeScript 98.8% | JavaScript 1.2%
🌐
GitHub
github.com › google-github-actions › upload-cloud-storage
GitHub - google-github-actions/upload-cloud-storage: A GitHub Action for uploading files to a Google Cloud Storage (GCS) bucket. · GitHub
⚠️ WARNING! The Node.js runtime has known issues with unicode characters in filepaths on Windows. There is nothing we can do to fix this issue in our GitHub Action. If you use unicode or special characters in your filenames, please use gsutil or gcloud to upload instead.
Starred by 264 users
Forked by 56 users
Languages   TypeScript 99.0% | JavaScript 1.0%
🌐
GitHub
github.com › GoogleCloudPlatform › github-actions › issues › 13
gsutil Support · Issue #13 · google-github-actions/setup-gcloud
December 2, 2019 - @craigdbarber Is there any plan of having a gsutil action included in this repo? There doesn't seem to be anything now. This PR implements it but it was never merged and it looks like that repo wont exist after 12/31/2019. Thanks!
Author   spiray
🌐
GitHub
github.com › actions-hub › gcloud
GitHub - actions-hub/gcloud: GitHub Action for interacting with Google Cloud Platform (GCP) · GitHub
Defaults to gcloud, allowed values: gcloud, gsutil. For each new release of gcloud master branch is updated to the latest version. Also, the tag is creating with the same number as the gcloud version. If you want to always have the latest version of gcloud, use @master branch. But if you need some specific version of gcloud just use a specific tag. For example @271.0.0. name: gcloud on: [push] jobs: deploy: name: Deploy runs-on: ubuntu-latest steps: - uses: actions...
Starred by 241 users
Forked by 27 users
Languages   Shell 94.2% | Dockerfile 5.8%
🌐
GitHub
github.com › google-github-actions › auth › issues › 49
Document and/or support authentication for gsutil · Issue #49 · google-github-actions/auth
November 18, 2021 - TL;DR I want to be able to use gsutil within github action using Workload Identity Federation for authentication. Detailed design The readme says how to configure gcloud using Workload Identity Fed...
Author   gpoulin-hopper
🌐
GitHub
github.com › GoogleCloudPlatform › gsutil › actions
Workflow runs · GoogleCloudPlatform/gsutil
May 23, 2024 - Update google-auth version in setup.py Gsutil CI #2197: Pull request #1873 synchronize by sameer-google · June 24, 2025 10:17 1m 48s sameer-google:google-auth ... You can’t perform that action at this time.
Author   GoogleCloudPlatform
🌐
GitHub
github.com › marketplace › actions › google-cloud-platform-gcp-cli-gcloud
Google Cloud Platform (GCP) CLI - gcloud · Actions · GitHub Marketplace · GitHub
- id: google_cloud_auth name: Authenticate to Google Cloud uses: google-github-actions/auth@v1 with: workload_identity_provider: 'projects/${{ secrets.gcp_project_number }}/locations/global/workloadIdentityPools/${{ secrets.workload_identity_pool }/providers/${{ secrets.workload_identity_provider }}' service_account: '${{ secrets.workload_identity_service_account }}@${{ secrets.gcp_project_name }}.iam.gserviceaccount.com' token_format: 'access_token' - uses: actions-hub/gcloud@master env: PROJECT_ID: ${{ secrets.gcp_project_name }} CLOUDSDK_AUTH_ACCESS_TOKEN: '${{ steps.google_cloud_auth.outputs.access_token }}' with: args: info ... The gsutil command does not support the CLOUDSDK_AUTH_ACCESS_TOKEN variable; use gcloud storage to interact with GCS.
🌐
Stack Overflow
stackoverflow.com › questions › 77005903 › error-using-gsutil-in-github-actions-workflow-with-google-github-actions-auth
Error using gsutil in Github Actions workflow (with google-github-actions/auth): Cant issue ID_TOKEN for job in Completed state - Stack Overflow
jobs: build-and-test: runs-on: self-hosted permissions: contents: read id-token: write steps: - name: Check out uses: actions/checkout@v3 - id: auth uses: "google-github-actions/auth@v1" with: workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} token_format: "access_token" And they complete without errors. ... - name: Download test data run: | mkdir -pv ${MY_VAR} gsutil -m rsync -r gs://some-bucket/some-folder ${MY_VAR}
Find elsewhere
🌐
GitHub
github.com › google-github-actions › auth › issues › 404
gsutil isn't authenticated · Issue #404 · google-github-actions/auth
April 2, 2024 - name: Docs build & upload on: push: branches: - main env: GCS_DEST: gs://... jobs: build: runs-on: ubuntu-latest strategy: matrix: python-version: ["3.11"] steps: - uses: actions/checkout@v4 - name: "google cloud auth" uses: "google-github-actions/auth@v2" with: credentials_json: "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}" - name: publish if: ${{ github.ref == 'refs/heads/main' }} run: | gsutil -m rsync -x 'compiled/.*$|.*\.msgpack$' -R -r target ${{ env.GCS_DEST }}
Author   pvanderlinden
🌐
Mickaelvieira
mickaelvieira.com › blog › 2020 › 01 › 29 › deploying-a-static-website-to-google-cloud-storage-with-github-actions.html
Deploying a static website to Google Cloud Storage with Github Actions - Mickaël Vieira - Software Engineer #go #javascript #python #rust
January 29, 2020 - - name: Authenticate on GCS uses: google-github-actions/auth@v0 with: service_account: '${{ secrets.GCP_SA_EMAIL }}' credentials_json: '${{ secrets.GCP_SA_KEY }}' - name: Set up Cloud SDK uses: google-github-actions/setup-gcloud@v0 · By default Hugo generates the static website into the public directory, so we only need to synchronise this directory with our GCS bucket. To do so, we can use the gsutil and rsync commmands:
🌐
YouTube
youtube.com › watch
GitHub Actions Deployments to Google Cloud Storage - YouTube
In this tutorial, we demystify the process of automating deployments to Google Cloud Storage using GitHub Actions. We dive deep into the setup, taking you th...
Published   July 16, 2023
Top answer
1 of 1
1

Answered by DazWilkin

I think file systems aren't shared between jobs (create_zip, google_cloud_services). You may want to prove this and consider moving the actions/download-artifact to google_cloud_services.

Working code

name: CI Workflow

on:
  push:
    branches:
      - main

env:
  PROJECT_ID: "flights-429420"
  BUCKET_NAME: "flights-cicd-bucket"

create_zip:
    runs-on: ubuntu-latest
    needs: test
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
        
      - name: Install zip
        run: sudo apt-get install zip

      - name: Create jobs.zip
        run: |
          cd app
          zip -r ../jobs.zip jobs

      - name: Upload zip file
        uses: actions/upload-artifact@v3
        with:
          name: jobs
          path: jobs.zip


  google_cloud_services:
    runs-on: ubuntu-latest
    needs: create_zip
    steps:

      - uses: actions/checkout@v3

      - name: Download zip file artifact
        uses: actions/download-artifact@v3
        with:
          name: jobs
          path: ./downloads
      
      - name: Authenticate with GCP using Service Account
        uses: 'google-github-actions/auth@v2'
        with:
          credentials_json: ${{ secrets.GCP_ACCOUNT_KEY }}
      
      - name: Setup GCP CLI
        uses: 'google-github-actions/setup-gcloud@v2'
        with:
          project_id: ${{ env.GCP_PROJECT_ID }}
          install_components: 'gsutil'
      
      - name: Create GCS bucket if not exists
        run: |
          if ! gsutil ls -b gs://${{ env.BUCKET_NAME }}/; then
            gsutil mb -l EU gs://${{ env.BUCKET_NAME }}/
          fi
      
      - name: Upload files to GCS
        run: |
          gsutil cp ./downloads/jobs.zip gs://${{ env.BUCKET_NAME }}/jobs.zip
          gsutil cp app/main.py gs://${{ env.BUCKET_NAME }}/main.py
          gcloud storage objects update gs://${{ env.BUCKET_NAME }}/main.py --content-type=application/octet-stream
🌐
CICube
cicube.io › home › workflow hub › how to configure google cloud sdk in github action?
How to Configure Google Cloud SDK in GitHub Action? - Workflow Hub - CI Cube
May 10, 2024 - How we can integrate Google Cloud SDK into our GitHub Actions workflow using setup-gcloud, a GitHub Action. This includes setting up the gcloud and gsutil binaries.
🌐
GitHub
github.com › google-github-actions
Google GitHub Actions · GitHub
A GitHub Action for installing and configuring the gcloud CLI.