File tree 2 files changed +23
-8
lines changed
database-name-branch-based
2 files changed +23
-8
lines changed Original file line number Diff line number Diff line change 8
8
database-name :
9
9
description : The name of the database to use for deployment
10
10
value : ${{ steps.determine-database-name.outputs.database-name }}
11
+ target-name :
12
+ description : The name of the current branch to target
13
+ value : ${{ steps.determine-branch-name.outputs.target-name }}
11
14
runs :
12
15
using : " composite"
13
16
steps :
29
32
run : |
30
33
echo "::set-output name=database-name::$(echo ${{ inputs.source-database-name }}_${{ env.BRANCH_NAME }} | tr a-z A-Z)"
31
34
35
+ - name : TARGET_NAME
36
+ id : determine-branch-name
37
+ shell : bash
38
+ run : |
39
+ echo "::set-output name=target-name::$(echo ${{ env.BRANCH_NAME }})"
40
+
32
41
- name : show target name
33
42
shell : bash
34
43
run : |
35
- echo "Target: ${{ steps.determine-database-name.outputs.database-name }}"
44
+ echo "Database: ${{ steps.determine-database-name.outputs.database-name }}"
45
+ echo "Target: ${{ steps.determine-branch-name.outputs.target-name }}"
Original file line number Diff line number Diff line change 1
- name : Returns the current branch name
2
- description : Returns the current branch name
1
+ name : Determine the deployment target name
2
+ description : Target name of the profile to use
3
3
outputs :
4
- branch -name :
5
- description : The name of the current branch
6
- value : ${{ steps.determine-branch-name.outputs.branch -name }}
4
+ target -name :
5
+ description : The name of the current branch to target
6
+ value : ${{ steps.determine-branch-name.outputs.target -name }}
7
7
runs :
8
8
using : " composite"
9
9
steps :
19
19
run : |
20
20
echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV
21
21
22
- - name : BRANCH_NAME
22
+ - name : TARGET_NAME
23
23
id : determine-branch-name
24
24
shell : bash
25
25
run : |
26
- echo "::set-output name=branch-name::$(echo ${{ env.BRANCH_NAME }} | tr a-z A-Z)"
26
+ echo "::set-output name=target-name::$(echo ${{ env.BRANCH_NAME }})"
27
+
28
+ - name : show target name
29
+ shell : bash
30
+ run : |
31
+ echo "Target: ${{ steps.determine-branch-name.outputs.target-name }}"
You can’t perform that action at this time.
0 commit comments