- Check contexts availability. Some contexts limit where they can be used. For example,
jobs.<job_id>.envworkflow key does not allow accessingenvcontext, butjobs.<job_id>.steps.envallows. See the official document for the complete list of contexts availability. (#180)actionlint reports the context is not available and what contexts are available as follows:... 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 }} ...
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()orfailure()are only available in conditions ofif:. See the official document for the complete list of special functions availability. (#214)actionlint reports... steps: # ERROR: 'success()' function is not available here - run: echo 'Success? ${{ success() }}' # OK: 'success()' function is available here if: success()
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
inputscontext is not available inrun-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_progresstype toworkflow_runwebhook 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@v3to popular actions data set. generate-availabilityscript was created to scrape the information about contexts and special functions availability from the official document. The information can be used throughactionlint.WorkflowKeyAvailability()Go API. This script is run once a week on CI to keep the information up-to-date.