fix(actions): ql pack installation

This commit is contained in:
Alvaro Muñoz
2024-02-16 14:47:34 +01:00
parent 003b8cc8c0
commit 8e59fb7558
3 changed files with 42 additions and 12 deletions

View File

@@ -28677,9 +28677,7 @@ async function downloadPack(codeql) {
exports.downloadPack = downloadPack;
async function installPack(codeql, dir) {
try {
await runCommand(codeql, ["pack", "download", "githubsecuritylab/actions-all"], path.join(dir, "/ql/lib"));
await runCommand(codeql, ["pack", "install"], path.join(dir, "/ql/lib"));
await runCommand(codeql, ["pack", "download", "githubsecuritylab/actions-queries"], path.join(dir, "/ql/src"));
await runCommand(codeql, ["pack", "install"], path.join(dir, "/ql/src"));
return true;
}

View File

@@ -111,17 +111,7 @@ export async function installPack(
dir: string,
): Promise<boolean> {
try {
await runCommand(
codeql,
["pack", "download", "githubsecuritylab/actions-all"],
path.join(dir, "/ql/lib"),
);
await runCommand(codeql, ["pack", "install"], path.join(dir, "/ql/lib"));
await runCommand(
codeql,
["pack", "download", "githubsecuritylab/actions-queries"],
path.join(dir, "/ql/src"),
);
await runCommand(codeql, ["pack", "install"], path.join(dir, "/ql/src"));
return true;
} catch (error) {

42
.github/workflows/simple2.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: CI
on:
pull_request:
branches:
- main
jobs:
changed_files:
runs-on: ubuntu-latest
name: Test changed-files
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: source
uses: tj-actions/changed-files@v40
- name: Remove foo from changed files
id: step
uses: mad9000/actions-find-and-replace-string@3
with:
source: ${{ steps.source.outputs.all_changed_files }}
find: 'foo'
replace: ''
- name: List all changed files
id: sink
run: |
for file in ${{ steps.step.outputs.value }}; do
echo "$file was changed"
done
- name: List all changed files
id: no-flow
run: |
for file in ${{ steps.source.outputs.all_changed_files_count }}; do
echo "$file was changed"
done