Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find 'action.yml', 'action.yaml' or 'Dockerfile' for action 'GoogleCloudPlatform/github-actions/setup-gcloud@main'. #675

Open
basit511 opened this issue Jan 2, 2024 · 1 comment

Comments

@basit511
Copy link

basit511 commented Jan 2, 2024

TL;DR

Deploying a Docker Image to GCP - GCR

Expected behavior

No response

Observed behavior

No response

Action YAML

#Deploy.yml
name: Deploy to GKE

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout Repository
      uses: actions/checkout@v2

    - name: Set up Google Cloud SDK
      uses: GoogleCloudPlatform/github-actions/setup-gcloud@main
      with:
        project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
        service_account_key: ${{ secrets.GCLOUD_KEY }}
        export_default_credentials: true
        
    - name: Build Docker Image
      run: |
        docker build -t gcr.io/${{ secrets.GCLOUD_PROJECT_ID }}/hello.py:${{ github.sha }} .
        docker push gcr.io/${{ secrets.GCLOUD_PROJECT_ID }}/hello.py:${{ github.sha }}

    - name: Configure kubectl
      run: |
        gcloud container clusters get-credentials ${{ secrets.GCLOUD_CLUSTER_NAME }} --zone ${{ secrets.GCLOUD_ZONE }}

    - name: Deploy to GKE
      run: |
        kubectl set image deployment/hello.py-deployment hello.py=gcr.io/${{ secrets.GCLOUD_PROJECT_ID }}/hello.py:${{ github.sha }}

Log output

Current runner version: '2.311.0'
Operating System
Runner Image
Runner Image Provisioner
GITHUB_TOKEN Permissions
Secret source: Actions
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v2' (SHA:ee0669bd1cc54295c223e0bb666b733df41de1c5)
Download action repository 'GoogleCloudPlatform/github-actions@main' (SHA:5a5f7b85fca43e76e53463acaa9d408a03c98d3a)
Error: Can't find 'action.yml', 'action.yaml' or 'Dockerfile' for action 'GoogleCloudPlatform/github-actions/setup-gcloud@main'.

Additional information

No response

@basit511 basit511 added the bug Something isn't working label Jan 2, 2024
@sethvargo
Copy link
Member

Hi @basit511 - that's because GoogleCloudPlatform/github-actions/setup-gcloud@main does not exist. The GitHub action is google-github-actions/setup-gcloud@v2. Where did you find GoogleCloudPlatform/github-actions/setup-gcloud@main?

@sethvargo sethvargo removed the bug Something isn't working label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants