Skip to content
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

False positive with complex runs-on statement #499

Open
to-s opened this issue Jan 2, 2025 · 2 comments
Open

False positive with complex runs-on statement #499

to-s opened this issue Jan 2, 2025 · 2 comments

Comments

@to-s
Copy link

to-s commented Jan 2, 2025

We did the following changes as suggested here:

diff --git a/.github/workflows/StaticCodeAnalysis.yml b/.github/workflows/StaticCodeAnalysis.yml
index 22fefc415..e272fbf2c 100644
--- a/.github/workflows/StaticCodeAnalysis.yml
+++ b/.github/workflows/StaticCodeAnalysis.yml
@@ -191,7 +191,9 @@ jobs:
         working-directory: build
   clang-tidy:
     if: github.event_name != 'push'
-    runs-on: ubuntu-22.04-64core
+    runs-on:
+      - runs-on=${{ github.run_id }}
+      - runner=64cpu-linux-x64
     timeout-minutes: 10
     steps:
       - name: Disable man-db update

As a temporary fix, we are configured action lint like the following:

diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml
index a39d21a43..f575486fb 100644
--- a/.github/actionlint.yaml
+++ b/.github/actionlint.yaml
@@ -7,6 +7,7 @@ self-hosted-runner:
     - ubuntu-22.04-4core
     - ubuntu-22.04-8core
     - ubuntu-22.04-64core
+    - runner=64cpu-linux-x64
 # Configuration variables in array of strings defined in your repository or
 # organization. `null` means disabling configuration variables check.
 # Empty array means no configuration variable is allowed.

Logs from the installation and run:

2025-01-02T14:43:34.4435458Z ##[group]Run GOBIN=$(realpath .) go install github.com/rhysd/actionlint/cmd/actionlint@latest
2025-01-02T14:43:34.4439743Z �[36;1mGOBIN=$(realpath .) go install github.com/rhysd/actionlint/cmd/actionlint@latest�[0m
2025-01-02T14:43:34.4591099Z shell: /usr/bin/bash -e {0}
2025-01-02T14:43:34.4592916Z ##[endgroup]
2025-01-02T14:43:35.0120989Z go: downloading github.com/rhysd/actionlint v1.7.5
2025-01-02T14:43:35.5083677Z go: downloading github.com/bmatcuk/doublestar/v4 v4.7.1
2025-01-02T14:43:35.5097236Z go: downloading github.com/fatih/color v1.18.0
2025-01-02T14:43:35.6294252Z go: downloading github.com/mattn/go-colorable v0.1.13
2025-01-02T14:43:35.6299402Z go: downloading github.com/mattn/go-runewidth v0.0.16
2025-01-02T14:43:35.7088283Z go: downloading github.com/mattn/go-shellwords v1.0.12
2025-01-02T14:43:35.7275879Z go: downloading github.com/robfig/cron/v3 v3.0.1
2025-01-02T14:43:35.7977116Z go: downloading golang.org/x/sync v0.10.0
2025-01-02T14:43:35.8866909Z go: downloading golang.org/x/sys v0.28.0
2025-01-02T14:43:35.8867833Z go: downloading gopkg.in/yaml.v3 v3.0.1
2025-01-02T14:43:36.3594586Z go: downloading github.com/mattn/go-isatty v0.0.20
2025-01-02T14:43:36.4302667Z go: downloading github.com/rivo/uniseg v0.4.7
2025-01-02T14:43:47.6923251Z ##[group]Run ./actionlint -shellcheck= -ignore '".+" is potentially untrusted'
2025-01-02T14:43:47.6923930Z �[36;1m./actionlint -shellcheck= -ignore '".+" is potentially untrusted'�[0m
2025-01-02T14:43:47.6980890Z shell: /usr/bin/bash -e {0}
2025-01-02T14:43:47.6981511Z ##[endgroup]
2025-01-02T14:43:47.7188873Z .github/workflows/StaticCodeAnalysis.yml:196:9: label "runner=64cpu-linux-x64" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows", "ubuntu-20.04-4core", "ubuntu-20.04-8core", "ubuntu-20.04-64core", "ubuntu-22.04-4core", "ubuntu-22.04-8core", "ubuntu-22.04-64core", "64cpu-linux-x64". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file [runner-label]
2025-01-02T14:43:47.7193745Z     |
2025-01-02T14:43:47.7194225Z 196 |       - runner=64cpu-linux-x64
2025-01-02T14:43:47.7194912Z     |         ^~~~~~~~~~~~~~~~~~~~~~
2025-01-02T14:43:47.7206612Z ##[error]Process completed with exit code 1.
2025-01-02T14:43:47.7312931Z Post job cleanup.

Maybe there is a better solution available?

@rhysd
Copy link
Owner

rhysd commented Jan 4, 2025

Is the runner=64cpu-linux-x64 your self-hosted runner? If so, please configure the label in actionlint.yml configuration file because actionlint doesn't know what label is setup.

https://github.com/rhysd/actionlint/blob/main/docs/config.md

@to-s
Copy link
Author

to-s commented Jan 7, 2025

Is the runner=64cpu-linux-x64 your self-hosted runner? If so, please configure the label in actionlint.yml configuration file because actionlint doesn't know what label is setup.

https://github.com/rhysd/actionlint/blob/main/docs/config.md

Thanks for that fast response. That's what we already did, we added the label 64cpu-linux-x64, but the key runner and the assignment operator = as well. That does not look correct. How to avoid this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants