From c328b35183e33bf7ad96a8ca5ef702fa6579bf4e Mon Sep 17 00:00:00 2001 From: Wagner Santos Date: Fri, 29 Jan 2021 06:21:52 -0300 Subject: [PATCH] chore: check result disabling commands at action level, but enabling on job --- .github/workflows/commitlint.yml | 2 ++ action.yml | 9 ++++++--- src/action.js | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index a2d87b1..61ccd01 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -3,6 +3,8 @@ on: [push, pull_request] jobs: commitlint: + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/action.yml b/action.yml index d538655..3912975 100644 --- a/action.yml +++ b/action.yml @@ -3,7 +3,8 @@ description: Lints Pull Request commit messages with commitlint author: Wagner Santos inputs: configFile: - description: Commitlint config file. If the file doesn't exist, config-conventional settings will be + description: + Commitlint config file. If the file doesn't exist, config-conventional settings will be loaded as a fallback. default: ./commitlint.config.js required: false @@ -11,11 +12,11 @@ inputs: description: > When set to true, we follow only the first parent commit when seeing a merge commit. More info in git-log docs https://git-scm.com/docs/git-log#Documentation/git-log.txt---first-parent - default: "true" + default: 'true' required: false failOnWarnings: description: Whether you want to fail on warnings or not - default: "false" + default: 'false' required: false helpURL: description: Link to a page explaining your commit message convention @@ -34,6 +35,8 @@ outputs: runs: using: docker image: docker://wagoid/commitlint-github-action:2.1.7 + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: 'false' branding: icon: check-square color: blue diff --git a/src/action.js b/src/action.js index e8dcaa8..67bbe72 100644 --- a/src/action.js +++ b/src/action.js @@ -135,6 +135,8 @@ const showLintResults = async ([from, to]) => { ) const formattedResults = formatErrors(lintedCommits) + console.log('::set-env name=MY_ENV::MY_VALUE') + // disable workflow commands const token = uuidv4() console.log(`::stop-commands::${token}`)