Skip to content

Commit

Permalink
Save the var result first before concatenating
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronaldo Macapobre committed Feb 12, 2025
1 parent 8a3cd88 commit 968d86d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/actions/deploy-lambda/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,17 @@ runs:
shell: bash
run: |
echo "Lambda: ${{ inputs.lambda }}"
RESOURCE="${{ inputs.lambda }}"
LAMBDA="${{ inputs.lambda }}"
echo "RESOURCE=${RESOURCE%%/*}" >> $GITHUB_ENV
echo "LAMBDA=${LAMBDA##*/}" >> $GITHUB_ENV
# Store the input value in a variable
LAMBDA_INPUT="${{ inputs.lambda }}"
# Extract RESOURCE and LAMBDA
RESOURCE="${LAMBDA_INPUT%%/*}"
LAMBDA="${LAMBDA_INPUT##*/}"
# Save variables as ENV var
echo "RESOURCE=$RESOURCE" >> $GITHUB_ENV
echo "LAMBDA=$LAMBDA" >> $GITHUB_ENV
echo "IMAGE_NAME=${RESOURCE}.${LAMBDA}" >> $GITHUB_ENV
- name: Set reusable variables
Expand Down

0 comments on commit 968d86d

Please sign in to comment.