Skip to content

Refactor CI workflows#37487

Merged
wxiaoguang merged 3 commits intogo-gitea:mainfrom
wxiaoguang:refactor-github-actions-workflows
Apr 30, 2026
Merged

Refactor CI workflows#37487
wxiaoguang merged 3 commits intogo-gitea:mainfrom
wxiaoguang:refactor-github-actions-workflows

Conversation

@wxiaoguang
Copy link
Copy Markdown
Contributor

@wxiaoguang wxiaoguang commented Apr 30, 2026

  1. only trigger docker-dryrun arm64&riscv64 when dockerfile changes (there should be no problem to run go build with QEMU VM)
  2. de-duplicate "contents: read" permission for most workflows
  3. merge various "lint-*" jobs into one job
  4. add missing lint targets to the "lint" (all) target

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 30, 2026
@wxiaoguang wxiaoguang force-pushed the refactor-github-actions-workflows branch 4 times, most recently from 236bd02 to 64df715 Compare April 30, 2026 02:02
@wxiaoguang wxiaoguang changed the title Refactor build workflows Refactor CI workflows Apr 30, 2026
@wxiaoguang wxiaoguang force-pushed the refactor-github-actions-workflows branch 3 times, most recently from 832fea8 to f3c9eac Compare April 30, 2026 02:25
@wxiaoguang wxiaoguang added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Apr 30, 2026
@wxiaoguang wxiaoguang requested a review from Copilot April 30, 2026 02:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors CI workflow configuration to reduce duplication, consolidate linting, and avoid slow/low-signal CI runs (notably QEMU Docker dryruns), while expanding the “lint all” Makefile target to cover more lint types.

Changes:

  • Expand make lint to include templates/swagger/markdown/actions/json/yaml lint targets.
  • Centralize permissions: contents: read at workflow level and de-duplicate per-job permissions.
  • Replace the reusable docker dryrun workflow with a composite action and disable slow non-amd64 dryruns by default; consolidate several compliance lint jobs into a single “on-demand” job.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
Makefile Adds missing lint targets to the lint (all) target.
.github/workflows/pull-e2e-tests.yml Moves contents: read permissions to workflow level.
.github/workflows/pull-docker-dryrun.yml Switches to composite action for docker dryrun; disables arm64/riscv64 jobs by default.
.github/workflows/pull-db-tests.yml Moves contents: read permissions to workflow level.
.github/workflows/pull-compliance.yml Consolidates multiple lint jobs into a single “lint-on-demand” job; adjusts build checks.
.github/workflows/part-docker-dryrun.yml Removes now-unused reusable workflow.
.github/workflows/files-changed.yml Moves contents: read permissions to workflow level.
.github/workflows/cron-renovate.yml Moves contents: read permissions to workflow level.
.github/workflows/cache-seeder.yml Moves contents: read permissions to workflow level.
.github/actions/docker-dryrun/action.yml Introduces a composite action encapsulating docker dryrun steps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/pull-docker-dryrun.yml
Comment thread .github/actions/docker-dryrun/action.yml Outdated
Comment thread .github/actions/docker-dryrun/action.yml Outdated
Comment thread .github/workflows/pull-compliance.yml
Comment thread .github/workflows/pull-compliance.yml
Comment thread .github/workflows/pull-docker-dryrun.yml
@wxiaoguang wxiaoguang force-pushed the refactor-github-actions-workflows branch from f3c9eac to 504858e Compare April 30, 2026 02:36
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 30, 2026
@techknowlogick
Copy link
Copy Markdown
Member

@silverwind
Copy link
Copy Markdown
Member

silverwind commented Apr 30, 2026

disable docker-dryrun arm64&riscv64: extremely slow, and not really useful

It was useful to catch riscv64 failures on initial alpine 3.23 versions which had busybox bugs (https://gitlab.alpinelinux.org/alpine/aports/-/issues/17775). Native runners would be the ideal solution. If you disable here we will run into situations again where those builds only fail on main branch.

@wxiaoguang wxiaoguang force-pushed the refactor-github-actions-workflows branch from ad6b342 to fd77200 Compare April 30, 2026 17:36
@wxiaoguang
Copy link
Copy Markdown
Contributor Author

Only use slow dryrun only for dockerfile: fd77200

@silverwind
Copy link
Copy Markdown
Member

Seems ok, that will catch alpine bugs and other bugs should be exceedingly rare, I think they could only come from vite/rolldown.

@wxiaoguang
Copy link
Copy Markdown
Contributor Author

I think they could only come from vite/rolldown.

vite/rolldown run on host cpu, and are run by many other jobs, won't have problem.

@silverwind
Copy link
Copy Markdown
Member

silverwind commented Apr 30, 2026

True for the docker builds, yeah. Not true for someone completely building from source on those archs, but the old pipeline didn't validate that either, so fine.

@GiteaBot GiteaBot removed the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Apr 30, 2026
@GiteaBot GiteaBot added the lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. label Apr 30, 2026
@wxiaoguang wxiaoguang merged commit 1721c23 into go-gitea:main Apr 30, 2026
22 checks passed
@GiteaBot GiteaBot added this to the 1.27.0 milestone Apr 30, 2026
@wxiaoguang wxiaoguang deleted the refactor-github-actions-workflows branch April 30, 2026 18:15
@silverwind
Copy link
Copy Markdown
Member

silverwind commented Apr 30, 2026

One downside of this refactor is we have 3 "skipped step" spam in every pr now, instead of 1 previously:

image

@wxiaoguang
Copy link
Copy Markdown
Contributor Author

wxiaoguang commented Apr 30, 2026

One downside of this refactor is we have 3 "skipped step" spam in every pr now, instead of 1 previously:

But there are fewer "lint" steps than before.

Overall, the total items are fewer

image

silverwind added a commit to silverwind/gitea that referenced this pull request Apr 30, 2026
* origin/main:
  Refactor CI workflows (go-gitea#37487)
  Allow multiple projects per issue and pull requests (go-gitea#36784)
  [skip ci] Updated translations via Crowdin
  Refactor compare diff/pull page (1) (go-gitea#37481)
  Fix review submission from single-commit PR view (go-gitea#37475)
  Refactor integration tests infrastructure (go-gitea#37462)
  Fix allow maintainer edit permission check (go-gitea#37479)
  Serve OpenAPI 3.0 spec at /openapi.v1.json (go-gitea#37038)
  Batch-load related data in actions run, job, and task API endpoints (go-gitea#37032)
  Add DEFAULT_TITLE_SOURCE setting for pull request title default behavior (go-gitea#37465)
  Fix compare dropdown for branches without common history (go-gitea#37470)
  FIX: URL sanitization to handle schemeless credentials (go-gitea#37440)
  Refactor pull request view (4) (go-gitea#37451)

# Conflicts:
#	modules/indexer/issues/elasticsearch/elasticsearch.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants