Skip to content

Commit

Permalink
fix(workflow): environment name cannot have env
Browse files Browse the repository at this point in the history
  • Loading branch information
MrOrz committed Oct 3, 2023
1 parent a4e2f82 commit a4fa9a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ jobs:
hostname: ja.
devHostname: dev-ja.
environment:
name: ${{ env.PRODUCTION && 'production' || 'staging' }}${{ matrix.locales.postfix }}
# evironment.name does not have `env`, cannot use env.PRODUCTION in environment name.
# Ref: https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
name: ${{ startsWith(github.ref, 'refs/tags/release') && 'production' || 'staging' }}${{ matrix.locales.postfix }}
url: https://${{ env.PRODUCTION && matrix.locales.hostname || matrix.locales.devHostname }}cofacts.tw
steps:
- uses: 'google-github-actions/auth@v1'
Expand Down

0 comments on commit a4fa9a4

Please sign in to comment.