Skip to content

ci: use a workflow dependency lockfile instead of vendored actions - #524

Merged
interimadd merged 2 commits into
mainfrom
ci/use-workflow-lockfile
Oct 30, 2026
Merged

interimadd merged 2 commits into
mainfrom
ci/use-workflow-lockfile

Conversation

@interimadd

Copy link
Copy Markdown
Contributor

PR Type

  • Improvement

Related Links

Description

This PR is a proposal for discussion. It replaces the workaround in #519 with a workflow dependency lockfile (.github/workflows/actions.lock).

The lockfile records the commit of each action, including the actions that composite actions call. GitHub Actions runs the recorded commits. Thus the organization policy for full-length commit SHAs is satisfied without vendored copies of upstream actions. Workflow lockfiles became generally available on 2026-10-28.

In tier4/driving_log_replayer_v2#429, the same approach passed the policy check for actions nested in composite actions (actions/cache@v4 in pre-commit/action, cspell-action@v9 in spell-check).

This PR has two commits:

  1. Revert ci: workaround -- pin actions nested inside composite actions and reusable workflows #519. This removes the vendored .github/actions/colcon-build and .github/actions/colcon-test, and uses the upstream actions again.
  2. Generate the lockfile with gh actions-lock v0.4.0. The tool changes the uses: references from SHAs to exact tags (for example actions/checkout@v7.0.1).

The other changes from #518 (permissions, concurrency, and inputs passed through env) are not changed.

Exception: semantic-pull-request

gh actions-lock does not lock reusable workflows from other repositories (limitation, github/gh-actions-lock#179). Thus this PR keeps the inlined job from #519 in semantic-pull-request.yaml.

Behavior compared to #519

  • pre-commit-optional uses the upstream autoware-github-actions/pre-commit again. Its autofix push step cannot push with contents: read. If pre-commit finds no changes, the step does nothing. If pre-commit changes files, the job fails, but it fails in that case already.
  • documentation.yml uses actions/upload-pages-artifact@v3.0.1 again. The lockfile locks its nested actions/upload-artifact@v4.

Review Procedure

  1. Make sure that the CI jobs pass the setup step and are not rejected by the SHA pinning policy.
  2. Run gh actions-lock --verify locally. The result must be All 9 workflows valid. It shows a warning for the ros:${{ matrix.rosdistro }} container image, because the lockfile cannot lock container images.

Remarks

To update the lockfile, install the extension and run it:

gh extension install github/gh-actions-lock
gh actions-lock

Dependabot updates the lockfile entry in the same pull request when it updates an action.

Pre-Review Checklist for the PR Author

PR Author should check the checkboxes below when creating the PR.

  • Assign PR to reviewer

Checklist for the PR Reviewer

Reviewers should check the checkboxes below before approval.

  • Commits are properly organized and messages are according to the guideline
  • (Optional) Unit tests have been written for new behavior
  • PR title describes the changes

Post-Review Checklist for the PR Author

PR Author should check the checkboxes below before merging.

  • All open points are addressed and tracked via issues or tickets

CI Checks

  • Build and test for PR: Required to pass before the merge.

Generate .github/workflows/actions.lock with gh actions-lock v0.4.0.
The lockfile records the commits of all actions, including actions
that composite actions call, so the workflows use readable tags again.

Keep the inlined semantic-pull-request job from #519, because
gh actions-lock does not lock reusable workflows from other
repositories.
@mojomex
mojomex self-requested a review October 29, 2026 08:08

@mojomex mojomex left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed code changes, CI status and gh actions-lock --verify. LGTM!

@mojomex

mojomex commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

@interimadd Thank you so much, I was looking for a nice solution like this. I'm 100% for it.

@interimadd
interimadd marked this pull request as ready for review October 29, 2026 08:15
@interimadd
interimadd enabled auto-merge (squash) October 29, 2026 08:18
@interimadd
interimadd disabled auto-merge October 30, 2026 06:26
@interimadd
interimadd merged commit e32751f into main Oct 30, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants