From 73160752fc3003e60b3a27228341f8c701332db4 Mon Sep 17 00:00:00 2001 From: Frederik Prijck Date: Wed, 13 Dec 2023 10:27:53 +0100 Subject: [PATCH 1/2] Ensure tag-exists action works as intended --- .github/actions/tag-exists/action.yml | 7 ++++++- .github/workflows/release.yml | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/actions/tag-exists/action.yml b/.github/actions/tag-exists/action.yml index e528612d..ab462d73 100644 --- a/.github/actions/tag-exists/action.yml +++ b/.github/actions/tag-exists/action.yml @@ -11,6 +11,10 @@ inputs: required: true tag: required: true + repo_owner: + required: true + repo_name: + required: true outputs: exists: @@ -21,7 +25,7 @@ runs: using: composite steps: - - id: check + - id: tag-exists shell: bash run: | GET_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/git/ref/tags/${TAG_NAME}" @@ -33,4 +37,5 @@ runs: fi env: TAG_NAME: ${{ inputs.tag }} + GITHUB_REPOSITORY: ${{ inputs.repo_owner }}/${{ inputs.repo_name }} GITHUB_TOKEN: ${{ inputs.token }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b3db000..c4ced718 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,6 +54,8 @@ jobs: with: tag: ${{ steps.get_version.outputs.version }} token: ${{ secrets.GITHUB_TOKEN }} + repo_owner: ${{ github.repository_owner }} + repo_name: ${{ github.event.repository.name }} # If the tag already exists, exit with an error - if: steps.tag_exists.outputs.exists == 'true' From 1fcd1a9bc59dc334968f3c86938dcbf6f457a4e1 Mon Sep 17 00:00:00 2001 From: Frederik Prijck Date: Wed, 13 Dec 2023 10:35:27 +0100 Subject: [PATCH 2/2] revert --- .github/actions/tag-exists/action.yml | 5 ----- .github/workflows/release.yml | 2 -- 2 files changed, 7 deletions(-) diff --git a/.github/actions/tag-exists/action.yml b/.github/actions/tag-exists/action.yml index ab462d73..b5fbdb73 100644 --- a/.github/actions/tag-exists/action.yml +++ b/.github/actions/tag-exists/action.yml @@ -11,10 +11,6 @@ inputs: required: true tag: required: true - repo_owner: - required: true - repo_name: - required: true outputs: exists: @@ -37,5 +33,4 @@ runs: fi env: TAG_NAME: ${{ inputs.tag }} - GITHUB_REPOSITORY: ${{ inputs.repo_owner }}/${{ inputs.repo_name }} GITHUB_TOKEN: ${{ inputs.token }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4ced718..9b3db000 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,8 +54,6 @@ jobs: with: tag: ${{ steps.get_version.outputs.version }} token: ${{ secrets.GITHUB_TOKEN }} - repo_owner: ${{ github.repository_owner }} - repo_name: ${{ github.event.repository.name }} # If the tag already exists, exit with an error - if: steps.tag_exists.outputs.exists == 'true'