Skip to content

v1.6.21

Compare
Choose a tag to compare
@github-actions github-actions released this 09 Oct 15:08
· 503 commits to main since this release
  • Check contexts availability. Some contexts limit where they can be used. For example, jobs.<job_id>.env workflow key does not allow accessing env context, but jobs.<job_id>.steps.env allows. See the official document for the complete list of contexts availability. (#180)
    ...
    
    env:
      TOPLEVEL: ...
    
    jobs:
      test:
        runs-on: ubuntu-latest
        env:
          # ERROR: 'env' context is not available here
          JOB_LEVEL: ${{ env.TOPLEVEL }}
        steps:
          - env:
              # OK: 'env' context is available here
              STEP_LEVEL: ${{ env.TOPLEVEL }}
            ...
    actionlint reports the context is not available and what contexts are available as follows:
    test.yaml:11:22: context "env" is not allowed here. available contexts are "github", "inputs", "matrix", "needs", "secrets", "strategy". see https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability for more details [expression]
       |
    11 |       JOB_LEVEL: ${{ env.TOPLEVEL }}
       |                      ^~~~~~~~~~~~
    
  • Check special functions availability. Some functions limit where they can be used. For example, status functions like success() or failure() are only available in conditions of if:. See the official document for the complete list of special functions availability. (#214)
    ...
    
    steps:
      # ERROR: 'success()' function is not available here
      - run: echo 'Success? ${{ success() }}'
        # OK: 'success()' function is available here
        if: success()
    actionlint reports success() is not available and where the function is available as follows:
    test.yaml:8:33: calling function "success" is not allowed here. "success" is only available in "jobs.<job_id>.if", "jobs.<job_id>.steps.if". see https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability for more details [expression]
      |
    8 |       - run: echo 'Success? ${{ success() }}'
      |                                 ^~~~~~~~~
    
  • Fix inputs context is not available in run-name: section. (#223)
  • Allow dynamic shell configuration like shell: ${{ env.SHELL }}.
  • Fix no error is reported when on: does not exist at toplevel. (#232)
  • Fix an error position is not correct when the error happens at root node of workflow AST.
  • Fix an incorrect empty event is parsed when on: section is empty.
  • Fix the error message when parsing an unexpected key on toplevel. (thanks @norwd, #231)
  • Add in_progress type to workflow_run webhook event trigger.
  • Describe the actionlint extension for Nova.app in the usage document. (thanks @jbergstroem, #222)
  • Note Super-Linter uses a different place for configuration file. (thanks @per-oestergaard, #227)
  • Add actions/setup-dotnet@v3 to popular actions data set.
  • generate-availability script was created to scrape the information about contexts and special functions availability from the official document. The information can be used through actionlint.WorkflowKeyAvailability() Go API. This script is run once a week on CI to keep the information up-to-date.