Skip to content

Commit 5a1c7bf

Browse files
committed
Sanitize artifact name for linting xml report
1 parent 3b96bdb commit 5a1c7bf

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/golangci_lint.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,21 @@ jobs:
4646
version=$(grep '^golangci-lint ' .tool-versions | awk '{print $2}')
4747
echo "version=${version}" | tee -a "$GITHUB_OUTPUT"
4848
49+
- name: Sanitize artifact name
50+
id: artifact-name
51+
env:
52+
MODULE: ${{ matrix.module }}
53+
run: |
54+
safe_name=${MODULE//\//-}
55+
echo "value=golangci-lint-report-${safe_name}" | tee -a "$GITHUB_OUTPUT"
56+
4957
- name: golangci-lint ${{ matrix.module }}
5058
if: ${{ always() && !contains(join(github.event.pull_request.labels.*.name, ' '), 'allow-lint-issues') }}
5159
# NOTE: Keep this version in sync with ACTION_CI_LINT_GO_GIT_TAG in ./script/lint.sh
5260
uses: smartcontractkit/.github/actions/ci-lint-go@dx-2618/golangci-lint # TODO - use versioned release
5361
with:
5462
checkout-repo: false
55-
artifact-name: golalngci-lint-report-${{ matrix.module }}
63+
artifact-name: ${{ steps.artifact-name.outputs.value }}
5664
golangci-lint-version: v${{ steps.get-version.outputs.version }}
5765
go-directory: ${{ matrix.module }}
5866
golangci-lint-args: "--output.text.path=stdout --output.checkstyle.path=${{ github.workspace }}/${{ matrix.module }}/golangci-lint-report.xml"

0 commit comments

Comments
 (0)