Skip to content

Commit 5ef0df1

Browse files
committed
feat(gh-actions): ✨ Added new output to pass to reusable workflow
1 parent 545b459 commit 5ef0df1

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/deploy-chatbot.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
outputs:
1212
artifact: ${{ steps.parse_command.outputs.infra }}
1313
environment: ${{ steps.parse_command.outputs.environment }}
14+
secret_name: ${{ steps.deploy-infra.outputs.secret_name}}
1415

1516
steps:
1617
- uses: actions/checkout@v4
@@ -85,6 +86,7 @@ jobs:
8586
8687
8788
- name: Deploy Infra
89+
id: deploy-infra
8890
if: steps.parse_command.outputs.infra != ''
8991
run: |
9092
case "${{ steps.parse_command.outputs.infra }}" in
@@ -99,8 +101,13 @@ jobs:
99101
exit 1
100102
;;
101103
esac
102-
echo 'artifact="${{ steps.parse_command.outputs.infra }}"' >> $GITHUB_ENV
103-
echo 'environment="${{ steps.parse_command.outputs.environment }}"' >> $GITHUB_ENV
104+
INFRA_UPPER=$(echo "${{ inputs.artifact }}" | tr 'a-z' 'A-Z')
105+
ENV_UPPER=$(echo "${{ inputs.environment }}" | tr 'a-z' 'A-Z')
106+
107+
SECRET_NAME="SS_${INFRA_UPPER}_${ENV_UPPER}"
108+
109+
echo "Generated secret_name: $secret_name"
110+
echo "SECRET_NAME=$secret_name" >> $GITHUB_OUTPUT
104111
105112
106113
- name: Update Deployment Status
@@ -121,4 +128,7 @@ jobs:
121128
uses: zerodaycode/app-summoners-sync/.github/workflows/deploy-infra.yml@develop
122129
with:
123130
artifact: ${{ needs.handle-deployment-on-pr-comment.outputs.artifact }}
124-
environment: ${{ needs.handle-deployment-on-pr-comment.outputs.environment }}
131+
environment: ${{ needs.handle-deployment-on-pr-comment.outputs.environment }}
132+
secret_name: ${{ needs.handle-deployment-on-pr-comment.outputs.secret_name }}
133+
secrets: inherit
134+

0 commit comments

Comments
 (0)