Skip to content

Commit 67c55bb

Browse files
committed
Address incorrect ref used for external help files
1 parent 873e341 commit 67c55bb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/code-scanning-pack-gen.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,24 @@ jobs:
6565
with:
6666
cli_path: ${{ github.workspace }}/codeql_home/codeql
6767

68+
- name: Determine ref for external help files
69+
id: determine-ref
70+
run: |
71+
if [[ $GITHUB_EVENT_NAME == "pull_request" ]]; then
72+
echo "EXTERNAL_HELP_REF=$GITHUB_HEAD_REF" >> "$GITHUB_ENV"
73+
else
74+
echo "EXTERNAL_HELP_REF=$GITHUB_REF" >> "$GITHUB_ENV"
75+
fi
76+
echo "Using ref $EXTERNAL_HELP_REF for external help files."
77+
6878
- name: Checkout external help files
6979
continue-on-error: true
7080
id: checkout-external-help-files
7181
uses: actions/checkout@v4
7282
with:
7383
ssh-key: ${{ secrets.CODEQL_CODING_STANDARDS_HELP_KEY }}
7484
repository: "github/codeql-coding-standards-help"
75-
ref: ${{ needs.determine-ref.outputs.ref }}
85+
ref: ${{ env.EXTERNAL_HELP_REF }}
7686
path: external-help-files
7787

7888
- name: Include external help files

0 commit comments

Comments
 (0)