From 495477b1c86501253818ad56ddc499aa9f8346c8 Mon Sep 17 00:00:00 2001 From: Sal Date: Thu, 14 Dec 2023 21:01:01 -0500 Subject: [PATCH 1/6] Update test.yml --- .github/workflows/test.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b6500cf..10967c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,46 +17,46 @@ jobs: steps: - uses: actions/checkout@v3 - name: 'tag-exists-action: true' - id: checkTag + id: exists uses: ./ with: tag: 'v1.0.0' - name: 'tag-exists-action: false' - id: notExist + id: not-exists uses: ./ with: tag: 'not-exist-tag-for-testing' - name: 'tag-exists-action: external repo - true' - id: externalRepoTagExists + id: external-repo-tag-exists uses: ./ with: tag: 'v3.6.0' repo: 'actions/checkout' - name: 'tag-exists-action: external repo - false' - id: externalRepoTagNotExists + id: external-repo-tag-not-exists uses: ./ with: tag: 'not-exist-tag-for-testing' repo: 'actions/checkout' - name: 'tag-exists-action: external repo exists - false' - id: externalRepoNotExists + id: external-repo-not-exists uses: ./ with: tag: 'not-exist-tag-for-testing' repo: 'fakeRepo/fakerepo' - - name: Result of checkTag + - name: Result of exists if: always() - run: test "true" = "${{ steps.checkTag.outputs.exists }}" - - name: Result of notExist + run: test "true" = "${{ steps.exists.outputs.exists }}" + - name: Result of not-exists if: always() - run: test "false" = "${{ steps.notExist.outputs.exists }}" - - name: Result of externalRepoTagExists + run: test "false" = "${{ steps.not-exists.outputs.exists }}" + - name: Result of external-repo-tag-exists if: always() - run: test "true" = "${{ steps.externalRepoTagExists.outputs.exists }}" - - name: Result of externalRepoTagNotExists + run: test "true" = "${{ steps.external-repo-tag-exists.outputs.exists }}" + - name: Result of external-repo-tag-not-exists if: always() - run: test "false" = "${{ steps.externalRepoTagNotExists.outputs.exists }}" - - name: Result of externalRepoNotExists + run: test "false" = "${{ steps.external-repo-tag-not-exists.outputs.exists }}" + - name: Result of external-repo-not-exists if: always() - run: test "false" = "${{ steps.externalRepoNotExists.outputs.exists }}" + run: test "false" = "${{ steps.external-repo-not-exists.outputs.exists }}" From b4d28a5083a3c6598f5afeb54910f0b263770804 Mon Sep 17 00:00:00 2001 From: Sal Date: Thu, 14 Dec 2023 21:05:43 -0500 Subject: [PATCH 2/6] Update README.md --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ff160b0..706c126 100644 --- a/README.md +++ b/README.md @@ -21,23 +21,25 @@ A string value of 'true' or 'false' To check if the tag `v1.0` exists in your repo: ```yaml -- uses: mukunku/tag-exists-action@v1.4.0 - id: checkTag +- uses: mukunku/tag-exists-action@v1.5.0 + id: check-tag with: tag: 'v1.0' -- run: echo ${{ steps.checkTag.outputs.exists }} +- run: echo ${{ steps.check-tag.outputs.exists }} ``` To check if the tag [`v1.0.0`](https://github.com/actions/checkout/releases/tag/v1.0.0) exists in the repo `actions/checkout`: ```yaml -- uses: mukunku/tag-exists-action@v1.4.0 - id: checkTag +- uses: mukunku/tag-exists-action@v1.5.0 + id: check-tag with: tag: 'v1.0.0' repo: 'actions/checkout' -- run: echo ${{ steps.checkTag.outputs.exists }} +- run: echo ${{ steps.check-tag.outputs.exists }} ``` +
+ This action uses the `${{github.token}}` secret to automatically inject your access token. If you'd like to provide your own token instead check out [this help article](https://github.com/mukunku/tag-exists-action/wiki/Setting-the-GITHUB_TOKEN-explicitly). From 1db224011c09254ede731931b79d83bab6abeff8 Mon Sep 17 00:00:00 2001 From: Sal Date: Thu, 14 Dec 2023 23:11:46 -0500 Subject: [PATCH 3/6] Update test.yml --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 10967c6..10a4786 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,3 +60,6 @@ jobs: - name: Result of external-repo-not-exists if: always() run: test "false" = "${{ steps.external-repo-not-exists.outputs.exists }}" + + - run: echo "yes" + if: ${{ steps.exists.outputs.exists == 'true' }} From 4d49c3b4507f1ee8ad7a371ebe348c664cc3c8fe Mon Sep 17 00:00:00 2001 From: Sal Date: Thu, 14 Dec 2023 23:14:20 -0500 Subject: [PATCH 4/6] Update test.yml --- .github/workflows/test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 10a4786..3dffb87 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,3 +63,10 @@ jobs: - run: echo "yes" if: ${{ steps.exists.outputs.exists == 'true' }} + - run: echo "no" + if: steps.not-exists.outputs.exists == 'false' + + - run: echo "yesxxxxx" + if: ${{ steps.exists.outputs.exists == 'false' }} + - run: echo "noxxxxx" + if: steps.not-exists.outputs.exists == 'true' From d058a36314eb458a740701b0b2f0e65ef39e53f9 Mon Sep 17 00:00:00 2001 From: Sal Date: Thu, 14 Dec 2023 23:16:03 -0500 Subject: [PATCH 5/6] Update test.yml --- .github/workflows/test.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3dffb87..10967c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,13 +60,3 @@ jobs: - name: Result of external-repo-not-exists if: always() run: test "false" = "${{ steps.external-repo-not-exists.outputs.exists }}" - - - run: echo "yes" - if: ${{ steps.exists.outputs.exists == 'true' }} - - run: echo "no" - if: steps.not-exists.outputs.exists == 'false' - - - run: echo "yesxxxxx" - if: ${{ steps.exists.outputs.exists == 'false' }} - - run: echo "noxxxxx" - if: steps.not-exists.outputs.exists == 'true' From 2e0596e96032d08a64dcd9b8e9bb3f2f61ee91c1 Mon Sep 17 00:00:00 2001 From: Sal Date: Thu, 14 Dec 2023 23:24:32 -0500 Subject: [PATCH 6/6] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 706c126..ce7f04b 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,8 @@ To check if the tag `v1.0` exists in your repo: with: tag: 'v1.0' -- run: echo ${{ steps.check-tag.outputs.exists }} +- run: echo "Tag exists!" + if: ${{ steps.check-tag.outputs.exists == 'true' }} ``` To check if the tag [`v1.0.0`](https://github.com/actions/checkout/releases/tag/v1.0.0) exists in the repo `actions/checkout`: @@ -37,7 +38,8 @@ To check if the tag [`v1.0.0`](https://github.com/actions/checkout/releases/tag/ tag: 'v1.0.0' repo: 'actions/checkout' -- run: echo ${{ steps.check-tag.outputs.exists }} +- run: echo "Tag exists!" + if: steps.check-tag.outputs.exists == 'true' # you can drop ${{ }} on 'if' checks ```