-
Notifications
You must be signed in to change notification settings - Fork 0
chore(ci): add base script for building and testing #43
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
Conversation
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: . | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Read .nvmrc | ||
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | ||
id: nvm | ||
- name: Use Node.js ${{ steps.nvm.outputs.NODE_VERSION }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ steps.nvm.outputs.NODE_VERSION }} | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm run test |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 6 days ago
To fix the issue, we will add a permissions
block at the root of the workflow file. This block will specify the least privileges required for the workflow to function correctly. Based on the provided workflow, it primarily involves checking out the repository, setting up Node.js, installing dependencies, building the project, and running tests. These tasks only require contents: read
permissions, as no write operations are performed.
The permissions
block will be added after the name
field and before the on
field in the workflow file.
-
Copy modified lines R2-R3
@@ -1,2 +1,4 @@ | ||
name: Carbon React Router starter template CI | ||
permissions: | ||
contents: read | ||
|
No description provided.