- This release much enhances checks for local reusable workflow calls. Note that these checks are done for local reusable workflows (starting with
./). (#179).- Detect missing required inputs/secrets and undefined inputs/secrets at
jobs.<job_id>.withandjobs.<job_id>.secrets. See the document for more details.# .github/workflows/reusable.yml on: workflow_call: inputs: name: type: string required: true secrets: password: required: true ... # .github/workflows/test.yml ... jobs: missing-required: uses: ./.github/workflows/reusable.yml with: # ERROR: Undefined input "user" user: rhysd # ERROR: Required input "name" is missing secrets: # ERROR: Undefined secret "credentials" credentials: my-token # ERROR: Required secret "password" is missing
- Type check for reusable workflow inputs at
jobs.<job_id>.with. Types are defined aton.workflow_call.inputs.<name>.typein reusable workflow. actionlint checks types of expressions in workflow calls. See the document for more details.# .github/workflows/reusable.yml on: workflow_call: inputs: id: type: number message: type: string ... # .github/workflows/test.yml ... jobs: type-checks: uses: ./.github/workflows/reusable.yml with: # ERROR: Cannot assign string value to number input. format() returns string value id: ${{ format('runner name is {0}', runner.name) }} # ERROR: Cannot assign null to string input. If you want to pass string "null", use ${{ 'null' }} message: null
- Detect local reusable workflow which does not exist at
jobs.<job_id>.uses. See the document for more details.jobs: test: # ERROR: This workflow file does not exist with: ./.github/workflows/does-not-exist.yml
- Check
needs.<job_id>.outputs.<output_id>in downstream jobs of workflow call jobs. The outputs object is now typed strictly based onon.workflow_call.outputs.<name>in the called reusable workflow. See the document for more details.# .github/workflows/get-build-info.yml on: workflow_call: outputs: version: value: ... description: version of software ... # .github/workflows/test.yml ... jobs: # This job's outputs object is typed as {version: string} get_build_info: uses: ./.github/workflows/get-build-info.yml downstream: needs: [get_build_info] runs-on: ubuntu-latest steps: # OK. `version` is defined in the reusable workflow - run: echo '${{ needs.get_build_info.outputs.version }}' # ERROR: `tag` is not defined in the reusable workflow - run: echo '${{ needs.get_build_info.outputs.tag }}'
- Detect missing required inputs/secrets and undefined inputs/secrets at
- Add missing properties in contexts and improve types of some properties looking at the official contexts document.
github.action_statusrunner.debugservices.<service_id>.ports
- Fix
on.workflow_call.inputs.<name>.descriptionandon.workflow_call.secrets.<name>.descriptionwere incorrectly mandatory. They are actually optional. - Report parse errors when parsing
action.ymlin local actions. They were ignored in previous versions. - Sort the order of properties in an object type displayed in error message. In previous versions, actionlint sometimes displayed
{a: true, b: string}, or it displayed{b: string, a: true}for the same object type. This randomness was caused by random iteration of map values in Go. - Update popular actions data set to the latest.