Giter VIP home page Giter VIP logo

Comments (5)

kkr16 avatar kkr16 commented on June 25, 2024 1

Issue is fixed - I had to pin to v0 AND put actions/checkout@v2 as the first step - I had tested the changes independently of each other. Can confirm that the below works great:

jobs:
  deploycr:
   runs-on: 'ubuntu-latest'
   permissions:
      contents: 'read'
      id-token: 'write'
   steps:
    - uses: actions/checkout@v2
    - id: 'auth'
      name: 'Authenticate to Google Cloud'
      uses: 'google-github-actions/auth@v0'
      with:
        workload_identity_provider: '...'
        service_account: '...'
    - name: Deploy to Cloud Run
      id: deploy
      uses: google-github-actions/deploy-cloudrun@v0
      with:
        service: hello-cloud-run 
        image: gcr.io/cloudrun/hello

Thanks @sethvargo !

from deploy-cloudrun.

kkr16 avatar kkr16 commented on June 25, 2024

I'm able to deploy using gcloud run within the same workflow using below syntax, which IMO, eliminates Service Account permissions issues or Identify Federation issues.

      run: |-
        gcloud run deploy test-cr --image=gcr.io/cloudrun/hello:latest --region=us-central1

from deploy-cloudrun.

sethvargo avatar sethvargo commented on June 25, 2024

Hi @kkr16

Thank you for opening an issue.

  1. We recommend pinning auth to @v0 unless you need to pin to a specific version. I don't think that is the issue here, but it's a best practice we're trying to advocate.

  2. It would be helpful if you could verify the auth step is working as intended. The easiest way to do this would be to add the token_format: 'access_token' property to the auth YAML:

    uses: 'google-github-actions/auth@v0'
    with:
      // existing values
      token_format: 'access_token'

from deploy-cloudrun.

sethvargo avatar sethvargo commented on June 25, 2024

Oh actually, I see it now. Can you add actions/checkout@v2 as the first step?

from deploy-cloudrun.

kkr16 avatar kkr16 commented on June 25, 2024

Thank you for your quick response Seth! :)

  1. We recommend pinning auth to @v0 unless you need to pin to a specific version. I don't think that is the issue here, but it's a best practice we're trying to advocate.

I tried pinning v0 then set it back to main to mimic the example #248 (comment) - either way doesn't work.

  1. It would be helpful if you could verify the auth step is working as intended. The easiest way to do this would be to add the token_format: 'access_token' property to the auth YAML

Did that - the auth step passes without issues.

Can you add actions/checkout@v2 as the first step?

Just tried it - no changes.

from deploy-cloudrun.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.