Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .github/workflows/gcp-auth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v3
Comment on lines +1 to +2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is not a valid GitHub Actions workflow as shown. A workflow must define at minimum name: (optional), on: (required), and jobs: (required). Right now it appears to be only a step fragment, which will cause the workflow to fail to load/execute.

Additionally, google-github-actions/auth@v3 generally requires configuration inputs (e.g., workload_identity_provider + service_account or a JSON key via credentials_json). Without with: inputs and without a job context, this step can’t run meaningfully.

Suggestion

Convert this into a complete workflow with triggers and a job, and provide the required auth inputs. For example:

name: Deploy to Cloud Run

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
    steps:
      - uses: actions/checkout@v4

      - name: Authenticate to Google Cloud
        uses: google-github-actions/auth@v3
        with:
          workload_identity_provider: ${{ secrets.GCP_WIF_PROVIDER }}
          service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}

(Then add subsequent steps for gcloud setup and Cloud Run deploy as needed.) Reply with "@CharlieHelps yes please" if you'd like me to add a commit with this suggestion.

Comment on lines +1 to +2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: Invalid GitHub Actions workflow structure.

This file is missing required top-level sections and will not execute. GitHub Actions workflows must include:

  • on: section to define workflow triggers
  • jobs: section to define jobs and their steps
  • Proper authentication configuration (workload identity provider, service account)
🔧 Proposed fix: Complete workflow structure
+name: Deploy to Cloud Run
+
+on:
+  push:
+    branches:
+      - main
+  pull_request:
+    branches:
+      - main
+
+jobs:
+  deploy:
+    runs-on: ubuntu-latest
+    
+    permissions:
+      contents: read
+      id-token: write
+    
+    steps:
 - name: Authenticate to Google Cloud
   uses: google-github-actions/auth@v3
+        with:
+          workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
+          service_account: ${{ secrets.WIF_SERVICE_ACCOUNT }}
+      
+      - name: Checkout code
+        uses: actions/checkout@v4
+      
+      # Add additional steps for building and deploying to Cloud Run

Note: You'll need to configure the following repository secrets:

  • WIF_PROVIDER: Your Workload Identity Provider resource name
  • WIF_SERVICE_ACCOUNT: Your service account email
🧰 Tools
🪛 actionlint (1.7.10)

1-1: "jobs" section is missing in workflow

(syntax-check)


1-1: "on" section is missing in workflow

(syntax-check)


1-1: "workflow" section is sequence node but mapping node is expected

(syntax-check)

🤖 Prompt for AI Agents
In @.github/workflows/cloudrun.yaml around lines 1 - 2, The workflow file is
missing required top-level sections; add an `on:` trigger (e.g., push or
workflow_dispatch) and a `jobs:` block containing a job (e.g., `deploy` or
`auth`) with `steps:` that include the existing `uses:
google-github-actions/auth@v3` step; configure that auth step with the
`workload_identity_provider` and `service_account` inputs pointing to the
repository secrets `WIF_PROVIDER` and `WIF_SERVICE_ACCOUNT`, and ensure
subsequent steps (build/deploy) run under that job so the workflow is valid and
authenticated.