File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed
Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -173,17 +173,42 @@ jobs:
173173 }
174174
175175 const files = actionFiles.map((file) => path.relative(process.env.GITHUB_WORKSPACE, file));
176-
177176 const filesOutput = [...new Set(files)].join(" ").trim();
178177
178+ if (filesOutput.length === 0) {
179+ return;
180+ }
181+
179182 core.setOutput("files", filesOutput);
180183
184+ // Add problem matcher for ratchet
185+ // FIXME: should retrieve ratchet file and line. See https://github.com/sethvargo/ratchet/issues/103.
186+ const problemMatcher = {
187+ "problemMatcher": [
188+ {
189+ "owner": "ratchet",
190+ "pattern": [
191+ { "regexp": "^found (\\d) unpinned refs: \\[([^\\]]+)\\]$", "message": 0 }
192+ ]
193+ }
194+ ]
195+ };
196+
197+ fs.writeFileSync("ratchet-problem-matcher.json", JSON.stringify(problemMatcher, null, 2));
198+
199+ # FIXME: use actions/github-script, needs: https://github.com/actions/toolkit/pull/2001
200+ - if : ${{ steps.get-files-to-lint.outputs.files }}
201+ run : echo "::add-matcher::ratchet-problem-matcher.json"
202+
181203 - id : ratchet
182204 uses : " docker://ghcr.io/sethvargo/ratchet:0.10.2@sha256:78f70ed0c85830a78bd9eeb265f49aa375d71887e4245aebc5da9c641d76b245" # v0.10.2
183205 if : ${{ steps.get-files-to-lint.outputs.files }}
184206 with :
185207 args : " check ${{ steps.get-files-to-lint.outputs.files }}"
186208
209+ - if : ${{ always() && steps.get-files-to-lint.outputs.files }}
210+ run : echo "::remove-matcher owner=ratchet::"
211+
187212 - if : ${{ failure() && steps.get-files-to-lint.outputs.files }}
188213 uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
189214 with :
You can’t perform that action at this time.
0 commit comments