github.com/nektos/act@v0.2.63/pkg/runner/testdata/pull-request/main.yaml (about)

     1  name: basic
     2  on: pull_request
     3  
     4  jobs:
     5    build:
     6      runs-on: ubuntu-latest
     7      steps:
     8        # test refs from event.json
     9        - run: echo '${{github.ref}}'
    10        - run: echo '${{github.head_ref}}' | grep sample-head-ref
    11        - run: echo '${{github.base_ref}}' | grep sample-base-ref
    12        # test main/composite context equality with data from event.json
    13        - run: |
    14            runs:
    15              using: composite
    16              steps:
    17              - run: |
    18                  echo WORKFLOW_GITHUB_CONTEXT="$WORKFLOW_GITHUB_CONTEXT"
    19                  echo COMPOSITE_GITHUB_CONTEXT="$COMPOSITE_GITHUB_CONTEXT"
    20                  [[ "$WORKFLOW_GITHUB_CONTEXT" = "$COMPOSITE_GITHUB_CONTEXT" ]]
    21                env:
    22                  WORKFLOW_GITHUB_CONTEXT: ${{ tojson(tojson(github.event)) }}
    23                  COMPOSITE_GITHUB_CONTEXT: ${{ '${{tojson(github.event)}}' }}
    24                shell: bash
    25          shell: cp {0} action.yml
    26        - uses: ./