-
Notifications
You must be signed in to change notification settings - Fork 33
π Fix GitHub Actions workflow bugs and typos #6865
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,10 +94,10 @@ jobs: | |
| - name: Build List | ||
| run: | | ||
| echo "=== Providers detected:" | ||
| echo ${{ steps.providers.outputs.providers }} | ||
| echo '${{ steps.providers.outputs.providers }}' | ||
mondoo-code-review[bot] marked this conversation as resolved.
Show resolved
Hide resolved
mondoo-code-review[bot] marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π‘ warning β Good fix. Quoting the expression with single quotes prevents shell word-splitting and glob expansion on the output, which also mitigates a potential script injection vector if the output contained attacker-controlled content. Correct as-is. |
||
|
|
||
| echo "=== Providers select to build:" | ||
| echo ${{ steps.providers.outputs.build_list }} | ||
| echo "=== Providers selected to build:" | ||
| echo '${{ steps.providers.outputs.build_list }}' | ||
|
|
||
| provider-build: | ||
| name: "${{ matrix.provider }}" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,12 +35,13 @@ jobs: | |
| - name: Run golangci-lint on all providers | ||
| env: | ||
| ONLY_NEW_ISSUES: ${{ inputs.only-new-issues }} | ||
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
mondoo-code-review[bot] marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π΄ critical β Good catch β |
||
| run: | | ||
| failed="" | ||
| extra_args="" | ||
| if [ "$ONLY_NEW_ISSUES" = "true" ] && [ -n "${BASE_SHA}" ]; then | ||
| git fetch origin "${BASE_SHA}" | ||
| extra_args="--new-from-rev=${BASE_SHA}" | ||
| git fetch origin "${BASE_SHA}" --depth=1 | ||
| extra_args="--new-from-rev=${BASE_SHA}" | ||
| fi | ||
| for provider in providers/*/; do | ||
| # Skip providers without go.mod (they are part of the main module) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would allow running the workflow against forked PR - i'd be hesitant to do it as-is; at the very least, we have steps that run on our self-hosted runners, and allowing 3rd party code to execute against those is probably not a good idea