Replace checkout in Forgejo Actions

Checkout is often the first compatibility issue because many workflows assume `actions/checkout` is reachable from GitHub.

Actions

What this solves

You need a Forgejo-friendly replacement for GitHub checkout behavior.

Best fit

  • GitHub Actions migrations
  • Private repositories
  • Self-hosted runner networks

How to think about it

Checkout is more than cloning the repository. Workflows may rely on authentication, submodules, Git LFS, fetch depth, private dependencies, and tags for versioning. Validate those cases before assuming the rest of the workflow is portable.

Explicit checkout shape

steps:
  - uses: actions/checkout@v4
    with:
      fetch-depth: 0
      submodules: recursive
  - run: git status --short
  - run: git describe --tags --always

Practical path

  1. 01 Identify where workflows reference `actions/checkout`.
  2. 02 Use a reachable checkout action or native git clone pattern for your runner.
  3. 03 Test submodules, LFS, and private dependency access explicitly.

When to choose another path

Use full history when release tooling needs tags.

Test submodules and LFS separately from normal source checkout.

Make private dependency credentials available to the runner.

Next resources

Related reading