-
Notifications
You must be signed in to change notification settings - Fork 0
Chore/update dependencies 2026 03 #22
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
Changes from 5 commits
4e1e506
90d20c9
0f155b8
8439035
4228a44
d6f0c44
8da9919
5640f89
979a5da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,111 +1,113 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Lint, build, test, deploy and tag | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paths-ignore: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "documentation/**" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paths-ignore: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "documentation/**" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| branches: [main] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| types: [opened, synchronize] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paths-ignore: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "documentation/**" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| branches: [main] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| types: [opened, synchronize] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paths-ignore: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "documentation/**" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Lint-Build-Test: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-22.04 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| environment: testing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/setup-node@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| node-version: "20" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Lint-Build-Test: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-22.04 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| environment: testing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/setup-node@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| node-version: "20" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install dependencies for frontend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cd frontend && npm install && cd .. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install dependencies for frontend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cd frontend && npm install && cd .. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install dependencies for backend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cd backend && npm install && cd .. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install dependencies for backend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cd backend && npm install && cd .. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Lint frontend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cd frontend && npm run lint && cd .. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Lint frontend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cd frontend && npm run lint && cd .. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Lint backend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cd backend && npm run lint && cd .. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Lint backend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cd backend && npm run lint && cd .. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Build frontend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cd frontend && npm run build:testing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VITE_MAPBOX_API: ${{ secrets.VITE_MAPBOX_API }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VITE_FIREBASE_TESTING_API_KEY: ${{ secrets.VITE_FIREBASE_TESTING_API_KEY }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VITE_FIREBASE_TESTING_AUTH_DOMAIN: ${{ secrets.VITE_FIREBASE_TESTING_AUTH_DOMAIN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VITE_FIREBASE_TESTING_PROJECT_ID: ${{ secrets.VITE_FIREBASE_TESTING_PROJECT_ID }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VITE_FIREBASE_TESTING_STORAGE_BUCKET: ${{ secrets.VITE_FIREBASE_TESTING_STORAGE_BUCKET }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VITE_FIREBASE_TESTING_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_TESTING_MESSAGING_SENDER_ID }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VITE_FIREBASE_TESTING_APP_ID: ${{ secrets.VITE_FIREBASE_TESTING_APP_ID }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MODE: testing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Build frontend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cd frontend && npm run build:testing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VITE_MAPBOX_API: ${{ secrets.VITE_MAPBOX_API }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VITE_FIREBASE_TESTING_API_KEY: ${{ secrets.VITE_FIREBASE_TESTING_API_KEY }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VITE_FIREBASE_TESTING_AUTH_DOMAIN: ${{ secrets.VITE_FIREBASE_TESTING_AUTH_DOMAIN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VITE_FIREBASE_TESTING_PROJECT_ID: ${{ secrets.VITE_FIREBASE_TESTING_PROJECT_ID }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VITE_FIREBASE_TESTING_STORAGE_BUCKET: ${{ secrets.VITE_FIREBASE_TESTING_STORAGE_BUCKET }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VITE_FIREBASE_TESTING_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_TESTING_MESSAGING_SENDER_ID }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VITE_FIREBASE_TESTING_APP_ID: ${{ secrets.VITE_FIREBASE_TESTING_APP_ID }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MODE: testing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Build backend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cd backend && npm run build:testing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NODE_ENV: test | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MONGODB_TESTING_URI: ${{secrets.MONGODB_TEST_URI}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SECRET: ${{ secrets.SECRET }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PORT: ${{ secrets.PORT }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FIREBASE_TESTING_CLIENT_EMAIL: ${{ secrets.FIREBASE_CLIENT_EMAIL }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FIREBASE_TESTING_PRIVATE_KEY: ${{ secrets.FIREBASE_PRIVATE_KEY }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FIREBASE_TESTING_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Build backend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cd backend && npm run build:testing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NODE_ENV: test | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MONGODB_TESTING_URI: ${{secrets.MONGODB_TEST_URI}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SECRET: ${{ secrets.SECRET }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PORT: ${{ secrets.PORT }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FIREBASE_TESTING_CLIENT_EMAIL: ${{ secrets.FIREBASE_CLIENT_EMAIL }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FIREBASE_TESTING_PRIVATE_KEY: ${{ secrets.FIREBASE_PRIVATE_KEY }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FIREBASE_TESTING_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Start backend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cd backend && npm run start:built-testing & | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for i in {1..50}; do | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if curl --silent --fail http://localhost:${{ secrets.PORT }}/api/testing/reset > /dev/null; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sleep 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Backend started" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Waiting for backend..." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sleep 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NODE_ENV: testing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MONGODB_TESTING_URI: ${{secrets.MONGODB_TEST_URI}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SECRET: ${{ secrets.SECRET }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PORT: ${{ secrets.PORT }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FIREBASE_TESTING_CLIENT_EMAIL: ${{ secrets.FIREBASE_CLIENT_EMAIL }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FIREBASE_TESTING_PRIVATE_KEY: ${{ secrets.FIREBASE_PRIVATE_KEY }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FIREBASE_TESTING_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Start backend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cd backend && npm run start:built-testing & | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for i in {1..50}; do | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if curl --silent --fail http://localhost:${{ secrets.PORT }}/api/testing/reset > /dev/null; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sleep 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Backend started" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Waiting for backend..." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sleep 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NODE_ENV: testing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MONGODB_TESTING_URI: ${{secrets.MONGODB_TEST_URI}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SECRET: ${{ secrets.SECRET }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PORT: ${{ secrets.PORT }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FIREBASE_TESTING_CLIENT_EMAIL: ${{ secrets.FIREBASE_CLIENT_EMAIL }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FIREBASE_TESTING_PRIVATE_KEY: ${{ secrets.FIREBASE_PRIVATE_KEY }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FIREBASE_TESTING_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Cypress E2E tests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: cypress-io/github-action@v5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| working-directory: frontend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| command: npm run cy:e2e | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| wait-on: ${{ secrets.CYPRESS_BASE_URL }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CYPRESS_TEST_EMAIL: ${{ secrets.CYPRESS_TEST_EMAIL }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CYPRESS_BASE_URL: ${{ secrets.CYPRESS_BASE_URL }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Deploy: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Deploy to Render | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| needs: Lint-Build-Test | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| environment: testing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: ${{ github.event_name == 'push' && contains(github.event.head_commit.message, '#DEPLOY') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Trigger deployment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: curl ${{ secrets.RENDER_DEPLOY_URL }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Cypress E2E tests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: cypress-io/github-action@v5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| working-directory: frontend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| command: npm run cy:e2e | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| wait-on: ${{ secrets.CYPRESS_BASE_URL }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CYPRESS_TEST_EMAIL: ${{ secrets.CYPRESS_TEST_EMAIL }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CYPRESS_BASE_URL: ${{ secrets.CYPRESS_BASE_URL }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Tag: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| needs: Lint-Build-Test | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: ${{ github.event_name == 'push' && contains(github.event.head_commit.message, '#RELEASE') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/setup-node@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: anothrNick/github-tag-action@1.67.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Bump version and push tag | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DEFAULT_BUMP: patch | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # now in our own VPS :) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Deploy: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # name: Deploy to Render | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # needs: Lint-Build-Test | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # environment: testing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # if: ${{ github.event_name == 'push' && contains(github.event.head_commit.message, '#DEPLOY') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - name: Trigger deployment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # run: curl ${{ secrets.RENDER_DEPLOY_URL }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Tag: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| needs: Lint-Build-Test | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: ${{ github.event_name == 'push' && contains(github.event.head_commit.message, '#RELEASE') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/setup-node@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: anothrNick/github-tag-action@1.67.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Bump version and push tag | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DEFAULT_BUMP: patch | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+104
to
+114
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI 3 months ago In general, the fix is to explicitly declare The best way to fix this without changing existing functionality is:
Concretely:
Suggested changeset
1
.github/workflows/build-and-test.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 3 months ago
In general, the problem is fixed by adding an explicit
permissions:block that grants only the minimalGITHUB_TOKENscopes needed. This can be defined at the top level of the workflow (applying to all jobs) and overridden per-job where broader access is required.For this workflow, the
Lint-Build-Testjob does not perform any repository writes; it only checks out code, installs dependencies, builds, and runs tests. It therefore only needscontents: read. TheTagjob usesanothrNick/github-tag-actionto create and push tags; this job needscontents: write. The best fix while preserving current behavior is:permissions:block aftername:(line 1) settingcontents: read. This will apply to all jobs by default.permissions:block under theTag:job (around line 103) specifyingcontents: writeso that the tag action can still push tags.No additional imports or methods are required; this is a pure workflow YAML change confined to
.github/workflows/build-and-test.yml.