From 50fb4b735bc14ee381337917afd1d43b5a622dbc Mon Sep 17 00:00:00 2001 From: Nathan Date: Tue, 13 Dec 2022 11:04:55 +0200 Subject: [PATCH 1/2] Update README.md Fix example based on discussion in https://github.com/anothrNick/github-tag-action/issues/215 --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 80188c9d..ea491e4c 100755 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ jobs: ``` ```yaml -# example 2: on merge to master +# example 2: on merge to master from pull request (recommended) name: Bump version on: pull_request: @@ -45,12 +45,13 @@ on: - master jobs: build: + if: github.event.pull_request.merged == true runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: '0' + ref: ${{ github.event.pull_request.merge_commit_sha }} + fetch-depth: "0" - name: Bump version and push tag uses: anothrNick/github-tag-action@v1 From 8d8cc7ab01394d51be195f2395c5a09ed7e5833e Mon Sep 17 00:00:00 2001 From: Nathan Date: Tue, 13 Dec 2022 11:06:56 +0200 Subject: [PATCH 2/2] Update README.md Revert qoutes to match original config --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ea491e4c..124c2ee8 100755 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ jobs: - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.merge_commit_sha }} - fetch-depth: "0" + fetch-depth: '0' - name: Bump version and push tag uses: anothrNick/github-tag-action@v1