actionlint v1.7.5

v1.7.5
Added 7
  • Strictly check available contexts in ${{ }} placeholders following the Context availability table in the official GitHub Actions documentation
  • Check string literals passed to fromJSON() calls and validate the JSON structure
  • Allow passing command arguments to -shellcheck option to support alternative shellcheck builds
  • Support undocumented repository_visibility, artifact_cache_size_limit, step_summary, output, and state properties in github context
  • Add black to the list of colors for branding.color action metadata
  • Add table to the list of icons for branding.icon action metadata
  • Add windows-2025 runner label to the known labels
Changed 2
  • Update popular actions data set to include download-artifact/v3-node20
  • Link to the documents of the stable version in actionlint man page and -help output
Fixed 3
  • Fix parsing escaped { in format() function call's first argument
  • Fix incorrect join() function overload that wrongly accepted join(s1: string, s2: string)
  • Fix missing reviewdog/action-hadolint@v1 action input in popular actions data set
Removed 1
  • Remove macos-12 runner label from known labels as it was dropped from GitHub-hosted runners

From actionlint

  • Strictly check available contexts in ${{ }} placeholders following the 'Context availability' table in the official document.
    • For example, jobs.<job_id>.defaults.run.shell allows env context but shell workflow keys in other places allow no context.
      defaults:
        run:
          # ERROR: No context is available here
          shell: ${{ env.SHELL }}
      
      jobs:
        test:
          runs-on: ubuntu-latest
          defaults:
            run:
              # OK: 'env' context is available here
              shell: ${{ env.SHELL }}
          steps:
            - run: echo hello
              # ERROR: No context is available here
              shell: ${{ env.SHELL}}
      
  • Check a string literal passed to fromJSON() call. This pattern is popular to create array or object constants because GitHub Actions does not provide the literal syntax for them. See the document for more details. (#464)
    jobs:
      test:
        # ERROR: Key 'mac' does not exist in the object returned by the fromJSON()
        runs-on: ${{ fromJSON('{"win":"windows-latest","linux":"ubuntul-latest"}')['mac'] }}
        steps:
          - run: echo This is a special branch!
            # ERROR: Broken JSON string passed to fromJSON.
            if: contains(fromJSON('["main","release","dev"'), github.ref_name)
    
  • Allow passing command arguments to -shellcheck argument. (#483, thanks @anuraaga)
    • This is useful when you want to use alternative build of shellcheck like go-shellcheck.
      actionlint -shellcheck="go run github.com/wasilibs/go-shellcheck/cmd/shellcheck@latest"
      
  • Support undocumented repository_visibility, artifact_cache_size_limit, step_summary, output, state properties in github context. (#489, thanks @rasa for adding repository_visibility property)
  • Remove macos-12 runner label from known labels because it was dropped from GitHub-hosted runners on Dec. 3 and is no longer available.
  • Add windows-2025 runner label to the known labels. The runner is in public preview. (#491, thanks @ericcornelissen)
  • Add black to the list of colors for branding.color action metadata. (#485, thanks @eifinger)
  • Add table to the list of icons for branding.icon action metadata.
  • Fix parsing escaped { in format() function call's first argument.
  • Fix the incorrect join() function overload. join(s1: string, s2: string) was wrongly accepted.
  • Update popular actions data set to the latest.
    • Add download-artifact/v3-node20 to the data set. (#468)
    • Fix missing the reviewdog/action-hadolint@v1 action input. (#487, thanks @mi-wada)
  • Link to the documents of the stable version in actionlint man page and -help output.
  • Refactor LintStdin() API example and some unit tests. (#472, #475, thanks @alexandear)
  • Improve the configuration example in actionlint.yaml document to explain glob patterns for paths. (#481)
View original

Upgraded? How did it go?

Discussion