From 738f481c4ef93da72cdfa9de9f41a3dbcb53bf2a Mon Sep 17 00:00:00 2001 From: samrobillard <22798020+samrobillard@users.noreply.github.com> Date: Fri, 27 Sep 2024 09:29:55 -0400 Subject: [PATCH] Rename workflow (#32) * Rename workflow * Move build version to param * Remove env var * Fix --------- Co-authored-by: Samuel Robillard --- ...reate-git-tag.yml => terraform-create-git-tag.yml} | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) rename .github/workflows/{create-git-tag.yml => terraform-create-git-tag.yml} (63%) diff --git a/.github/workflows/create-git-tag.yml b/.github/workflows/terraform-create-git-tag.yml similarity index 63% rename from .github/workflows/create-git-tag.yml rename to .github/workflows/terraform-create-git-tag.yml index feda68c..d8790ba 100644 --- a/.github/workflows/create-git-tag.yml +++ b/.github/workflows/terraform-create-git-tag.yml @@ -4,6 +4,12 @@ on: push: branches: - main + workflow_call: + inputs: + buildVersion: + description: 'Build version to use for the tag' + required: true + type: string jobs: create_tag: @@ -13,7 +19,6 @@ jobs: GIT_USER_NAME: "Infra Workleap" GIT_USER_EMAIL: "infra@workleap.com" SOURCE_VERSION_MESSAGE: "Automated tag creation" - BUILD_NUMBER: "1.0.0" steps: - name: Checkout repository @@ -21,8 +26,8 @@ jobs: - name: Create Git Tag run: | - echo "Creating tag [${{ env.BUILD_NUMBER }}] with message: ${{ env.SOURCE_VERSION_MESSAGE }}" + echo "Creating tag [${buildVersion}] with message: ${{ env.SOURCE_VERSION_MESSAGE }}" git config --global user.name "${{ env.GIT_USER_NAME }}" git config --global user.email "${{ env.GIT_USER_EMAIL }}" - git tag -a ${{ env.BUILD_NUMBER }} -m "${{ env.SOURCE_VERSION_MESSAGE }}" + git tag -a ${buildVersion} -m "${{ env.SOURCE_VERSION_MESSAGE }}" git push origin --tags