Skip to content

Commit f7a76cf

Browse files
added target base name
1 parent ad8d79d commit f7a76cf

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

setup/database-name-branch-based/action.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ outputs:
88
database-name:
99
description: The name of the database to use for deployment
1010
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 }}
1114
runs:
1215
using: "composite"
1316
steps:
@@ -29,7 +32,14 @@ runs:
2932
run: |
3033
echo "::set-output name=database-name::$(echo ${{ inputs.source-database-name }}_${{ env.BRANCH_NAME }} | tr a-z A-Z)"
3134
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+
3241
- name: show target name
3342
shell: bash
3443
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 }}"

setup/branch-name/action.yml renamed to setup/target-name-branch-based/action.yml

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
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
33
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 }}
77
runs:
88
using: "composite"
99
steps:
@@ -19,8 +19,13 @@ runs:
1919
run: |
2020
echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV
2121
22-
- name: BRANCH_NAME
22+
- name: TARGET_NAME
2323
id: determine-branch-name
2424
shell: bash
2525
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 }}"

0 commit comments

Comments
 (0)