chore(deps): update github/codeql-action action to v4.31.9 #2236
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lint | |
| on: | |
| push: | |
| pull_request_target: | |
| workflow_dispatch: | |
| permissions: write-all | |
| jobs: | |
| format: | |
| name: Format | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| token: ${{secrets.TOKEN || secrets.GITHUB_TOKEN}} | |
| ref: ${{github.head_ref}} | |
| repository: ${{github.event.pull_request.head.repo.full_name}} | |
| - name: Setup Node.JS | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: package.json | |
| cache: npm | |
| - name: Install | |
| run: npm ci | |
| - name: Format | |
| run: npm run format | |
| - name: Assert clean | |
| if: startsWith(github.ref_name, 'dependabot/') == true | |
| run: if [[ `git status --porcelain` ]]; then exit 1; fi | |
| - name: Commit | |
| uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0 | |
| with: | |
| commit_message: Format | |
| analyze: | |
| name: Analyze | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| ref: ${{github.head_ref}} | |
| repository: ${{github.event.pull_request.head.repo.full_name}} | |
| - name: Setup CodeQL | |
| uses: github/codeql-action/init@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8 | |
| with: | |
| languages: javascript | |
| queries: security-and-quality | |
| - name: Analyze | |
| uses: github/codeql-action/analyze@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8 | |
| test: | |
| name: Test | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: | |
| - "14.9" | |
| - "14.10" | |
| - "14.11" | |
| - "14.12" | |
| - "14.13" | |
| - "14.14" | |
| - "14.15" | |
| - "14.16" | |
| - "14.17" | |
| - "14.18" | |
| - "14.19" | |
| - "14.20" | |
| - "14.21" | |
| - "14.22" | |
| # - "dev" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| ref: ${{github.head_ref}} | |
| repository: ${{github.event.pull_request.head.repo.full_name}} | |
| path: "./strife.js" | |
| - name: Setup Node.JS | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: ./strife.js/package.json | |
| cache-dependency-path: ./strife.js/package-lock.json | |
| cache: npm | |
| - name: Set up | |
| working-directory: ./strife.js | |
| if: matrix.version != 'dev' | |
| run: | | |
| npm pkg delete "peerDependencies[discord.js]" | |
| npm pkg delete "devDependencies[discord.js]" | |
| npm pkg set "dependencies[discord.js]"=${{matrix.version}} | |
| new_overrides=$(curl -s "https://cdn.jsdelivr.net/npm/discord.js@${{matrix.version}}/package.json" | jq -c '.dependencies | with_entries(.value |= gsub("\\^|>"; "~"))') | |
| new_package=$(jq --tab --argjson newData "$new_overrides" '.overrides = $newData' package.json) | |
| echo "$new_package" > package.json | |
| discord_api_types=$(npm pkg get overrides.discord-api-types | sed "s/~//g") | |
| npm pkg set overrides.discord-api-types="$discord_api_types" --json | |
| - name: Install | |
| working-directory: ./strife.js | |
| if: matrix.version != 'dev' | |
| run: npm install | |
| - name: Install From Lockfile | |
| working-directory: ./strife.js | |
| if: matrix.version == 'dev' | |
| run: npm ci | |
| - name: Build & Test | |
| working-directory: ./strife.js | |
| run: npm run test | |
| - name: Setup Sample | |
| run: | | |
| mkdir ./sample-bot | |
| cp ./strife.js/package.json ./sample-bot/package.json | |
| cp -r ./strife.js/node_modules ./sample-bot/node_modules | |
| cp ./strife.js/tsconfig.json ./sample-bot/tsconfig.json | |
| - name: Install Strife | |
| working-directory: ./sample-bot | |
| run: | | |
| npm pkg set "name"=sample-bot | |
| npm pkg set "dependencies[strife.js]"=file:../strife.js | |
| echo -e 'import "discord.js";\nimport "strife.js";' > ./index.ts | |
| npm i | |
| - name: Test Compatibility | |
| working-directory: ./sample-bot | |
| run: npm run build | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| ref: ${{github.head_ref}} | |
| repository: ${{github.event.pull_request.head.repo.full_name}} | |
| - name: Setup Node.JS | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: package.json | |
| cache: npm | |
| - name: Install | |
| run: npm ci | |
| - name: Lint | |
| run: node --run lint |