Skip to content

Commit

Permalink
fix(workflow): matrix context does not have env
Browse files Browse the repository at this point in the history
Thus we rewrite matrix and use it in environment.url
  • Loading branch information
MrOrz authored Oct 3, 2023
1 parent 0dca403 commit a4e2f82
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,21 @@ jobs:
strategy:
matrix:
locales:
- region: us-east4
postfix: -en
hostname: ${{ env.PRODUCTION && 'en.' || 'dev-en.'}}
- region: asia-east1
postfix: -tw
hostname: ${{ env.PRODUCTION && '' || 'dev.'}}
hostname: ''
devHostname: dev.
- region: us-east4
postfix: -en
hostname: en.
devHostname: dev-en.
- region: asia-northeast1
postfix: -ja
hostname: ${{ env.PRODUCTION && 'ja.' || 'dev-ja.'}}
hostname: ja.
devHostname: dev-ja.
environment:
name: ${{ env.PRODUCTION && 'production' || 'staging' }}${{ matrix.locales.postfix }}
url: https://${{ matrix.locales.hostname }}cofacts.tw
url: https://${{ env.PRODUCTION && matrix.locales.hostname || matrix.locales.devHostname }}cofacts.tw
steps:
- uses: 'google-github-actions/auth@v1'
with:
Expand Down

0 comments on commit a4e2f82

Please sign in to comment.