Code Monkey home page Code Monkey logo

Comments (9)

lindluni avatar lindluni commented on July 20, 2024

Hi @rokeno

Did you set the url property to point your instances API?

https://github.com/lindluni/actions-variable-groups/blob/main/action.yml#L15

from actions-variable-groups.

rokeno avatar rokeno commented on July 20, 2024

No, i did not.
I did after i posted the issue and i got:

Error: Fail to retrieve files src/variableGroups/lz-dev.yml: Not Found

...which tells me that it reached the repo, but it did not find the file.
Trying now to add ${{ github.workspace }}/src/variableGroups/lz-dev.yml to see the result

from actions-variable-groups.

lindluni avatar lindluni commented on July 20, 2024

You shouldn't include the workspace, it is using the contents endpoint to reach your repo file and not bringing the repo locally. Can you share a redacted copy of your the workflow step where you are using the Action?

I profess I've never tested this on GHES, I've only ever added the support. Deploying GHES myself now to test this out.

from actions-variable-groups.

lindluni avatar lindluni commented on July 20, 2024

Also, what scope did you give to your token?

from actions-variable-groups.

rokeno avatar rokeno commented on July 20, 2024

Also, what scope did you give to your token?

Full.

from actions-variable-groups.

rokeno avatar rokeno commented on July 20, 2024

've never tested this on GHES, I've only ever added the support. Deploying GHES myself now to test this out.

      - name: Inject variables
        uses: ./.github/actions/actions-variable-groups-main
        with:
          org: ORG
          repo: PLATFORM
          url: https://github.domain.com/api/v3
          token: ${{ secrets.AUTHENTICATION_TOKEN }}
          groups: |
            src/variableGroups/lz-dev.yml

from actions-variable-groups.

rokeno avatar rokeno commented on July 20, 2024

well, worked :)

Appending variable ARM_CLIENT_ID to environment
Appending variable ARM_CLIENT_SECRET to environment
Appending variable ARM_SUBSCRIPTION_ID to environment
Appending variable ARM_TENANT_ID to environment
Appending variable backendAzureRmContainerkey to environment
Appending variable backendAzureRmResourceGroupkey to environment
Appending variable backendAzureRmStorageAccountkey to environment
Appending variable billingAccount to environment
Appending variable enrollmentAccount to environment
Appending variable backendServiceArm to environment
Appending variable RBAC_ARM_CLIENT_ID to environment
Appending variable RBAC_ARM_SUBSCRIPTION_ID to environment
Appending variable TARGET_ENVIRONMENT to environment
Appending variable TF_VAR_DEPLOY_COSTLY_RESOURCE to environment

I have removed the workspace and recreated the token with full (was NOT previously).
On the token: maybe you can guide me as to what rights it needs so i don't over-power it.

from actions-variable-groups.

lindluni avatar lindluni commented on July 20, 2024

Hey @rokeno

Unfortunately right now I would expect you to need full repo scope with the current token model. Soon we will be releasing a new token model that will allow you to select repo:contents:read scope to tightly scope the request.

from actions-variable-groups.

rokeno avatar rokeno commented on July 20, 2024

Thanks alot!.
You can close this issue.

from actions-variable-groups.

Related Issues (4)

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.