From 9933542c7557915cb4c4fb165db7ec5857052944 Mon Sep 17 00:00:00 2001 From: phips28 Date: Fri, 3 Apr 2020 12:31:23 +0200 Subject: [PATCH] test checkout v2 --- .github/workflows/push.yml | 4 ++-- index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 45093a6..11a96df 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -3,7 +3,7 @@ name: "Bump Version" on: push: branches: - - "master" + - "checkout_v2" jobs: bump-version: @@ -12,7 +12,7 @@ jobs: steps: - name: "Checkout source code" - uses: "actions/checkout@v1" + uses: "actions/checkout@v2" with: ref: ${{ github.ref }} - name: "cat package.json" diff --git a/index.js b/index.js index 92fb48c..859e2ef 100644 --- a/index.js +++ b/index.js @@ -36,7 +36,7 @@ Toolkit.run(async tools => { await tools.runInWorkspace('git', ['config', 'user.email', '"gh-action-bump-version@users.noreply.github.com"']) const currentBranch = /refs\/[a-zA-Z]+\/(.*)/.exec(process.env.GITHUB_REF)[1] - console.log('currentBranch:', currentBranch) + console.log('currentBranch:', currentBranch, process.env.GITHUB_REF) // do it in the current checked out github branch (DETACHED HEAD) // important for further usage of the package.json version