File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 release_tag : ${{ github.ref_name }}
1616 secrets :
1717 GITHUB : ${{ secrets.GITHUB }}
18+
19+ release-major-tag :
20+ needs : changelog
21+ if : always()
22+ uses : ./.github/workflows/release-maintain-major-tag.yml
23+ with :
24+ tag_name : ${{ github.ref_name }}
25+ secrets :
26+ GITHUB : ${{ secrets.GITHUB }}
1827...
Original file line number Diff line number Diff line change 22name : Release - Maintain Major Tag
33
44on :
5- release :
6- types : [published]
5+ workflow_call :
6+ inputs :
7+ tag_name :
8+ description : ' Tag name to update major version for'
9+ required : true
10+ type : string
11+ secrets :
12+ GITHUB :
13+ required : true
714
815permissions :
916 contents : write
1825 - name : Check tag format
1926 id : check
2027 run : |
21- TAG=${{ github.event.release. tag_name }}
28+ TAG=" ${{ inputs. tag_name }}"
2229
2330 echo "Release tag: $TAG"
2431
4047 uses : actions/checkout@v6
4148 with :
4249 fetch-depth : 0
50+ token : ${{ secrets.GITHUB }}
4351
4452 - name : Fetch tags
4553 run : git fetch --tags
5260 - name : Extract major version
5361 id : version
5462 run : |
55- TAG=${{ github.event.release. tag_name }}
63+ TAG=" ${{ inputs. tag_name }}"
5664 MAJOR=$(echo "$TAG" | cut -d. -f1)
5765 MAJOR_TAG="$MAJOR"
5866
6169
6270 - name : Update major tag
6371 run : |
64- git tag -f ${{ steps.version.outputs.major_tag }} ${{ github.event.release .tag_name }}
72+ git tag -f ${{ steps.version.outputs.major_tag }} ${{ inputs .tag_name }}
6573
6674 - name : Push major tag
6775 run : |
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: 🦸♂️ Smurf Terraform workflow
33on :
44 workflow_call :
55 inputs :
6- working_directory :
6+ terraform_directory :
77 required : true
88 type : string
99 description : ' Root directory of the terraform where all resources exist.'
3535 description : ' Approvals list to approve apply or destroy'
3636 smurf_version :
3737 type : string
38- default : v0.0.9
38+ default : latest
3939 description : ' Required Smurf version'
40+ terraform_version :
41+ type : string
42+ default : 1.3.6
43+ description : ' Required Terraform version'
4044 timeout :
4145 required : false
4246 type : number
@@ -177,6 +181,11 @@ jobs:
177181 with :
178182 token : ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
179183
184+ - name : 🛠️ Set up Terraform
185+ uses : hashicorp/setup-terraform@v4
186+ with :
187+ terraform_version : ${{ inputs.terraform_version }}
188+
180189 - name : ⚙️ Set up Smurf Terraform
181190 uses : clouddrove/smurf@v1.1.3
182191
@@ -222,6 +231,11 @@ jobs:
222231 - name : 📦 Checkout Repository
223232 uses : actions/checkout@v6
224233
234+ - name : 🛠️ Set up Terraform
235+ uses : hashicorp/setup-terraform@v4
236+ with :
237+ terraform_version : ${{ inputs.terraform_version }}
238+
225239 - name : ⚙️ Set up Smurf Terraform
226240 uses : clouddrove/smurf@v1.1.3
227241
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ Example:
3131The workflow runs when a ** GitHub Release is published** .
3232
3333``` yaml
34- on :
35- release :
36- types : [published]
34+ release-major-tag :
35+ needs : changelog
36+ if : always()
37+ uses : clouddrove/github-shared-workflows/.github/workflows/release-maintain-major-tag.yml
38+ with :
39+ tag_name : ${{ github.ref_name }}
40+ secrets :
41+ GITHUB : ${{ secrets.GITHUB }}
You can’t perform that action at this time.
0 commit comments