-
Notifications
You must be signed in to change notification settings - Fork 441
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
@types/github-script install fails in github action in dependabot pr's #487
Comments
Can you include the full set of commands you're using to install the types? |
Just to note again this error only occurs in pr's that are created by |
@Quintisimo where does If that's an Actions secret, is it also set as a Dependabot secret? |
@joshmgross yes I have set it both as an action secret and a dependabot secret |
Could you provide the full workflow? |
@joshmgross that is all the steps of the action. It is a custom org composite action that we use across multiple repos. Here is the it in full name: Setup Node Environment
description: Install Node, Pnpm, and dependencies
inputs:
node-auth-token:
description: Token to authenticate with npm registry
required: true
working-directory:
description: The directory to run the install command in
required: false
default: ${{ github.workspace }}
runs:
using: composite
steps:
- name: Get Pnpm Version from package.json
id: pnpm_version
working-directory: ${{ inputs.working-directory }}
shell: bash
run: |
version=$(jq -r '.packageManager' package.json)
echo "version=$(echo "$version" | sed 's/^pnpm@//')" >> $GITHUB_OUTPUT
- name: Get Node Version from .nvmrc
id: node_version
working-directory: ${{ inputs.working-directory }}
shell: bash
run: |
version=$(cat .nvmrc)
echo "version=$version" >> $GITHUB_OUTPUT
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ steps.pnpm_version.outputs.version }}
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node_version.outputs.version }}
- name: Install dependencies
working-directory: ${{ inputs.working-directory }}
shell: bash
run: pnpm install
env:
NODE_AUTH_TOKEN: ${{ inputs.node-auth-token }}
and here is how it is used in a name: Linting
run-name: Linting
on:
pull_request:
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup node and install dependencies
uses: The-Legal-Tech-Company/actions/src/setup-node-environment@main
with:
node-auth-token: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
- name: Run eslint
run: pnpm lint
- name: Run typecheck
run: pnpm typecheck
- name: Run test
run: pnpm test
|
@Quintisimo this is a bit outside the scope of the Can you double check that That's the only clear difference I see here, nothing in this action or the exported types should differ for a Dependabot run. |
Describe the bug
When npm dependencies are being installed in a github action in a dependabot pr, it fails on
@types/github-script
with a permission denied error. I am usingpnpm
but I would assume this error occurs in all package managers.To Reproduce
Steps to reproduce the behavior:
@types/github-script
pnpm install
pnpm install
in github actionExpected behavior
The install is successful
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: