Skip to content

Commit

Permalink
Rename workflow (#32)
Browse files Browse the repository at this point in the history
* Rename workflow

* Move build version to param

* Remove env var

* Fix

---------

Co-authored-by: Samuel Robillard <[email protected]>
  • Loading branch information
samrobillard and Samuel Robillard authored Sep 27, 2024
1 parent 41be906 commit 738f481
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -13,16 +19,15 @@ jobs:
GIT_USER_NAME: "Infra Workleap"
GIT_USER_EMAIL: "[email protected]"
SOURCE_VERSION_MESSAGE: "Automated tag creation"
BUILD_NUMBER: "1.0.0"

steps:
- name: Checkout repository
uses: actions/checkout@v4

- 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

0 comments on commit 738f481

Please sign in to comment.