Skip to content

Commit b5af7b0

Browse files
Merge branch 'main' into dependabot/npm_and_yarn/actions/exec-3.0.0
2 parents be7b479 + a5e70b6 commit b5af7b0

31 files changed

Lines changed: 2920 additions & 1424 deletions
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "Post comment"
2+
description: "Create or update a sticky PR comment identified by a caller-provided marker."
3+
inputs:
4+
marker:
5+
description: >
6+
Non-empty plain-text identifier for the comment. Use a unique, stable value
7+
for each distinct comment; it is automatically wrapped in a hidden HTML comment.
8+
required: true
9+
body:
10+
description: "Full comment markdown."
11+
required: true
12+
update-only:
13+
description: Do nothing if no comment with the specified marker exists.
14+
required: false
15+
default: "false"
16+
issue-id:
17+
description: >
18+
The issue or pull request number to post/update the comment on.
19+
Defaults to the current pull request if not provided.
20+
required: false
21+
token:
22+
description: "The GitHub token to authenticate with."
23+
required: true
24+
runs:
25+
using: composite
26+
steps:
27+
- name: Post comment
28+
shell: bash
29+
env:
30+
BODY: ${{ inputs.body }}
31+
MARKER: ${{ inputs.marker }}
32+
UPDATE_ONLY: ${{ case(inputs.update-only == 'true', '--update-only', '') }}
33+
GH_TOKEN: ${{ inputs.token }}
34+
ISSUE_ID: ${{ inputs.issue-id || github.event.pull_request.number }}
35+
run: |
36+
npx tsx ./pr-checks/post-comment.ts \
37+
--body "$BODY" \
38+
--marker "$MARKER" \
39+
$UPDATE_ONLY \
40+
--issue-id "$ISSUE_ID" \
41+
--repository "$GITHUB_REPOSITORY"

‎.github/actions/prepare-test/action.yml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ runs:
3636
set -e # Fail this Action if `gh release list` fails.
3737
3838
if [[ "$VERSION" == "nightly" || "$VERSION" == "nightly-latest" ]]; then
39-
echo "tools-url=nightly" >> "$GITHUB_OUTPUT"
39+
if [[ "$USE_ALL_PLATFORM_BUNDLE" == "true" ]]; then
40+
# With `tools: nightly`, the Action downloads the bundle for the runner's platform, so look
41+
# up the latest nightly release here to get its all-platform bundle instead.
42+
tag=$(gh release list --repo dsp-testing/codeql-cli-nightlies --limit 1 --json tagName --jq '.[0].tagName')
43+
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/codeql-bundle.tar.gz" >> "$GITHUB_OUTPUT"
44+
else
45+
echo "tools-url=nightly" >> "$GITHUB_OUTPUT"
46+
fi
4047
exit 0
4148
elif [[ "$VERSION" == "linked" ]]; then
4249
echo "tools-url=linked" >> "$GITHUB_OUTPUT"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
paths-ignore:
2+
- lib
3+
- tests
4+
queries:
5+
- uses: security-and-quality

‎.github/workflows/__all-platform-bundle.yml‎

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.github/workflows/__analysis-kinds.yml‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.github/workflows/__config-export.yml‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 28 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.github/workflows/codeql.yml‎

Lines changed: 7 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -19,70 +19,16 @@ env:
1919
CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks
2020

2121
jobs:
22-
# Identify the CodeQL tool versions to use in the analysis job.
23-
check-codeql-versions:
22+
analyze:
2423
if: github.triggering_actor != 'dependabot[bot]'
2524
runs-on: ubuntu-26.04
26-
outputs:
27-
versions: ${{ steps.compare.outputs.versions }}
2825

29-
permissions:
30-
contents: read
31-
# We currently need `security-events: read` to access feature flags.
32-
security-events: read
33-
34-
steps:
35-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
36-
- name: Set up default CodeQL bundle
37-
id: setup-default
38-
uses: ./setup-codeql
39-
- name: Set up linked CodeQL bundle
40-
id: setup-linked
41-
uses: ./setup-codeql
42-
with:
43-
tools: linked
44-
- name: Compare default and linked CodeQL bundle versions
45-
id: compare
46-
env:
47-
CODEQL_DEFAULT: ${{ steps.setup-default.outputs.codeql-path }}
48-
CODEQL_LINKED: ${{ steps.setup-linked.outputs.codeql-path }}
49-
run: |
50-
CODEQL_VERSION_DEFAULT="$("$CODEQL_DEFAULT" version --format terse)"
51-
CODEQL_VERSION_LINKED="$("$CODEQL_LINKED" version --format terse)"
52-
echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT"
53-
echo "Linked CodeQL bundle version is $CODEQL_VERSION_LINKED"
54-
55-
# If we're running on a pull request, run with both bundles, even if `tools: linked` would
56-
# be the same as `tools: null`. This allows us to make the job for each of the bundles a
57-
# required status check.
58-
#
59-
# If we're running on push or schedule, then we can skip running with `tools: linked` when it would be
60-
# the same as running with `tools: null`.
61-
if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$GITHUB_EVENT_NAME" != "merge_group" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LINKED" ]]; then
62-
VERSIONS_JSON='[null]'
63-
else
64-
VERSIONS_JSON='[null, "linked"]'
65-
fi
66-
67-
# Output a JSON-encoded list with the distinct versions to test against.
68-
echo "Suggested matrix config for analysis job: $VERSIONS_JSON"
69-
echo "versions=${VERSIONS_JSON}" >> $GITHUB_OUTPUT
70-
71-
analyze-javascript:
72-
if: github.triggering_actor != 'dependabot[bot]'
73-
needs: [check-codeql-versions]
7426
strategy:
7527
fail-fast: false
7628
matrix:
77-
os:
78-
- ubuntu-22.04
79-
- ubuntu-24.04
80-
- windows-2022
81-
- windows-2025
82-
- macos-14-xlarge
83-
- macos-15-xlarge
84-
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
85-
runs-on: ${{ matrix.os }}
29+
language:
30+
- actions
31+
- javascript
8632

8733
permissions:
8834
contents: read
@@ -95,49 +41,15 @@ jobs:
9541
uses: ./init
9642
id: init
9743
with:
98-
languages: javascript
99-
config-file: ./.github/codeql/codeql-config-javascript.yml
100-
tools: ${{ matrix.tools }}
44+
languages: ${{ matrix.language }}
45+
build-mode: none
46+
config-file: ./.github/codeql/codeql-config-${{ matrix.language }}.yml
10147
# confirm steps.init.outputs.codeql-path points to the codeql binary
10248
- name: Print CodeQL Version
10349
run: >
10450
"$CODEQL" version --format=json
10551
env:
10652
CODEQL: ${{steps.init.outputs.codeql-path}}
107-
- name: Perform CodeQL Analysis
108-
uses: ./analyze
109-
with:
110-
category: "/language:javascript"
111-
upload: ${{ (matrix.os == 'ubuntu-24.04' && !matrix.tools && github.event_name != 'merge_group' && 'always' ) || 'never' }}
112-
113-
analyze-other:
114-
if: github.triggering_actor != 'dependabot[bot]'
115-
runs-on: ubuntu-26.04
116-
117-
strategy:
118-
fail-fast: false
119-
matrix:
120-
include:
121-
- language: actions
122-
123-
permissions:
124-
contents: read
125-
security-events: write
126-
127-
steps:
128-
- name: Checkout
129-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
130-
- name: Initialize CodeQL
131-
uses: ./init
132-
with:
133-
languages: ${{ matrix.language }}
134-
build-mode: none
135-
config: >
136-
paths-ignore:
137-
- lib
138-
- tests
139-
queries:
140-
- uses: security-and-quality
14153
- name: Perform CodeQL Analysis
14254
uses: ./analyze
14355
with:

0 commit comments

Comments
 (0)