Skip to content

ci: test workflow env #6

ci: test workflow env

ci: test workflow env #6

Workflow file for this run

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

View workflow run for this annotation

GitHub Actions / Package

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml (Line: 36, Col: 14): Unexpected symbol: '$GITHUB_HEAD_REF'. Located at position 1 within expression: $GITHUB_HEAD_REF
echo ${{ $GITHUB_HEAD_REF }}
echo ${{ $GITHUB_REF }}
echo ${{ $GITHUB_REF_NAME }}