From 3a6c438752390f663770e7b733202122db1df6a0 Mon Sep 17 00:00:00 2001 From: Tycho Bokdam Date: Fri, 3 Jul 2020 22:04:16 +0200 Subject: [PATCH] docs: Updated README --- .github/workflows/test.yml | 8 ++++---- README.md | 8 ++++---- src/helpers/git.js | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c0276fe..e1c4d98 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: id: changelog uses: ./ env: - ENV: 'test' + ENV: 'dont-use-git' with: github-token: ${{ secrets.github_token }} @@ -33,7 +33,7 @@ jobs: id: changelog uses: ./ env: - ENV: 'test' + ENV: 'dont-use-git' with: github-token: ${{ secrets.github_token }} skip-commit: 'true' @@ -50,7 +50,7 @@ jobs: id: changelog uses: ./ env: - ENV: 'test' + ENV: 'dont-use-git' with: github-token: ${{ secrets.github_token }} version-file: 'test-file.yaml' @@ -68,7 +68,7 @@ jobs: id: changelog uses: ./ env: - ENV: 'test' + ENV: 'dont-use-git' with: github-token: ${{ secrets.github_token }} version-file: 'test-file.toml' diff --git a/README.md b/README.md index d63a188..bcaffe9 100644 --- a/README.md +++ b/README.md @@ -119,16 +119,16 @@ If you'd like to contribute to this project, all you need to do is clone and ins $ yarn install # To run / test json versioning -$ act -j test-json -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 -s github_token= +$ act -j test-json -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 -s github_token=fake-token # To run / test git versioning -$ act -j test-git -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 -s github_token= +$ act -j test-git -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 -s github_token=fake-token # To run / test yaml versioning -$ act -j test-yaml -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 -s github_token= +$ act -j test-yaml -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 -s github_token=fake-token # To run / toml git versioning -$ act -j test-toml -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 -s github_token= +$ act -j test-toml -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 -s github_token=fake-token ``` ## [License](./LICENSE) diff --git a/src/helpers/git.js b/src/helpers/git.js index d5ae9fe..de5c185 100644 --- a/src/helpers/git.js +++ b/src/helpers/git.js @@ -16,7 +16,8 @@ module.exports = new (class Git { const gitUserName = core.getInput('git-user-name') const gitUserEmail = core.getInput('git-user-email') - if (ENV === 'test') { + // if the env is dont-use-git then we mock exec as we are testing a workflow locally + if (ENV === 'dont-use-git') { this.exec = (command) => { console.log(`Skipping "git ${command}" because of test env`) }