ci: test workflow env #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Package | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
name: Hello Everyone | ||
defaults: | ||
run: | ||
shell: bash | ||
env: | ||
MATT_ENV: ${{ (github.event.pull_request.merged == true && github.head_ref == 'main') && 'production' || 'staging' }} | ||
PACKAGE_TAG: ${{ (github.event.pull_request.merged == true && github.head_ref == 'main') && '' || '--tag beta' }} | ||
steps: | ||
- name: test 1 | ||
run: | | ||
echo ${{ github.event.pull_request.merged }} | ||
echo ${{ github.head_ref }} | ||
- name: test 2 | ||
run: | | ||
echo ${{ (github.event.pull_request.merged == true && github.head_ref == 'main') && 'production' || 'staging' }} | ||
echo ${{ (github.event.pull_request.merged == true && github.head_ref == 'main') && '' || '--tag beta' }} | ||
- name: test 3 | ||
run: | | ||
echo ${{ env.MATT_ENV }} | ||
echo ${{ env.PACKAGE_TAG }} | ||
- name: test 4 | ||
run: | | ||
Check failure on line 36 in .github/workflows/test.yml GitHub Actions / PackageInvalid workflow file
|
||
echo ${{ $GITHUB_HEAD_REF }} | ||
echo ${{ $GITHUB_REF }} | ||
echo ${{ $GITHUB_REF_NAME }} |