mirror of
https://github.com/hadolint/hadolint-action.git
synced 2025-01-18 21:44:45 +01:00
fix: Remove problem matcher after run (#16)
This commit is contained in:
parent
bf7fe9f9b9
commit
1623ba6171
2 changed files with 10 additions and 2 deletions
10
hadolint.sh
10
hadolint.sh
|
@ -7,7 +7,15 @@
|
||||||
TMP_FOLDER=$(mktemp -d -p .)
|
TMP_FOLDER=$(mktemp -d -p .)
|
||||||
cp /problem-matcher.json "${TMP_FOLDER}"
|
cp /problem-matcher.json "${TMP_FOLDER}"
|
||||||
chmod -R a+rX "${TMP_FOLDER}"
|
chmod -R a+rX "${TMP_FOLDER}"
|
||||||
trap "rm -rf \"${TMP_FOLDER}\"" EXIT
|
|
||||||
|
# After the run has finished we remove the problem-matcher.json from
|
||||||
|
# the repository so we don't leave the checkout dirty. We also remove
|
||||||
|
# the matcher so it won't take effect in later steps.
|
||||||
|
cleanup() {
|
||||||
|
echo "::remove-matcher owner=brpaz/hadolint-action::"
|
||||||
|
rm -rf "${TMP_FOLDER}"
|
||||||
|
}
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
echo "::add-matcher::${TMP_FOLDER}/problem-matcher.json"
|
echo "::add-matcher::${TMP_FOLDER}/problem-matcher.json"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"problemMatcher": [
|
"problemMatcher": [
|
||||||
{
|
{
|
||||||
"owner": "hadolint",
|
"owner": "brpaz/hadolint-action",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
{
|
{
|
||||||
"regexp": "(.*)\\:(\\d+)\\s(.*)",
|
"regexp": "(.*)\\:(\\d+)\\s(.*)",
|
||||||
|
|
Loading…
Add table
Reference in a new issue