Skip to content

Commit

Permalink
fix: add good extension for stagings - refacto and use GITHUB_OUTPUT
Browse files Browse the repository at this point in the history
  • Loading branch information
noisegratte committed Aug 9, 2024
1 parent ffd08f1 commit f643dd2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ on:

jobs:
set-url:
name: Prepare URL
runs-on: ubuntu-latest
outputs:
url: ${{ steps.set-url.outputs.url }}
Expand All @@ -37,12 +38,13 @@ jobs:
id: set-url
run: |
if [ "${{ matrix.target }}" == "lemon" ]; then
echo "::set-output name=url::https://staging-${{ inputs.name }}.${{ matrix.target }}.fr"
DOMAIN="fr"
elif [ "${{ matrix.target }}" == "traack" ]; then
echo "::set-output name=url::https://staging-${{ inputs.name }}.${{ matrix.target }}.io"
DOMAIN="io"
else
echo "::set-output name=url::https://staging-${{ inputs.name }}.${{ matrix.target }}.com"
DOMAIN="com"
fi
echo "name=url::https://staging-${{ inputs.name }}.${{ matrix.target }}.$DOMAIN" >> $GITHUB_OUTPUT
deploy:
name: Deploy Staging
Expand Down

0 comments on commit f643dd2

Please sign in to comment.