Skip to content

ci: name jobs and workflow files after what they do - #354

Merged
lens0021 merged 2 commits into
mainfrom
ci/specific-job-names
Aug 15, 2026
Merged

lens0021 merged 2 commits into
mainfrom
ci/specific-job-names

Conversation

@lens0021

@lens0021 lens0021 commented Aug 15, 2026 •

Copy link
Copy Markdown
Collaborator

A job id is the status check context. It is read in the ruleset's required-checks list, next to biome, phpcs, phpunit (master) and typos, where build and build-and-check say nothing about what ran. #344 also showed the concrete cost: a second job named build put two same-named check runs on one commit and made the required-check verdict depend on which reported last. File names get the same treatment, so a reader scanning .github/workflows/ sees what each one runs.

Renames only, no behaviour change.

what old new required context
job in docker-image.yml build docker-image yes
job in smoke.yml build-and-check smoke yes
job in deploy-docs.yml build-and-deploy deploy-pages no
file docker-build.yml docker-image.yml n/a
file tf.yml tofu.yml n/a

smoke.yml bakes the docs site, asserts the output, then runs the browser tests, so bake would have covered half of it. deploy-pages is what the job actually does: publish to the gh-pages branch. tofu.yml matches the workflow's own name and the tool it runs.

The uses: in release-please.yml, the path filter in tofu.yml, and the two prose references in smoke.yml and pr-preview.yml follow the file renames. Nothing references the three job ids.

Also drops .github/workflows/dependencies, a stray file from be87a48 holding a fragment of phan's Gadgets config. It has no extension, so GitHub never treated it as a workflow.

The required contexts live in Terraform

.tf/ruleset.tf declares the required checks, so it carries the renamed contexts here rather than being clicked in the web UI.

Renaming a required context cannot be a single step: while the ruleset still requires build, this pull request can never satisfy it, because the job now reports as docker-image. So build and build-and-check were dropped from the live ruleset through the API first, which is what let this pull request go green. Applying this branch's .tf after merge puts docker-image and smoke in their place and clears the drift.

Between those two moments the two gates are off. deploy-pages and binary are not required contexts and need neither step.

@github-actions

github-actions Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

OpenTofu Plan

github_repository.this: Preparing import... [id=wikven]
github_repository.this: Refreshing state... [id=wikven]
github_repository_pages.this: Preparing import... [id=wikven]
github_repository_ruleset.default: Preparing import... [id=wikven:17638220]
github_repository_pages.this: Refreshing state... [id=436976489]
github_repository_ruleset.default: Refreshing state... [id=17638220]

OpenTofu used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place (current -> planned)

OpenTofu will perform the following actions:

  # github_repository.this will be imported
  # (imported from "wikven")
    resource "github_repository" "this" {
        allow_auto_merge            = true
        allow_forking               = true
        allow_merge_commit          = false
        allow_rebase_merge          = false
        allow_squash_merge          = true
        allow_update_branch         = true
        archived                    = false
        auto_init                   = false
        default_branch              = "main"
        delete_branch_on_merge      = true
        description                 = "A static web site generator using MediaWiki."
        etag                        = "W/\"909b046854b2c5d9e1c9c48b0598f97db7ae7ffbc2da7d1837500bdd0b438566\""
        fork                        = "false"
        full_name                   = "chaotic-ground/wikven"
        git_clone_url               = "git://github.com/chaotic-ground/wikven.git"
        has_discussions             = false
        has_downloads               = false
        has_issues                  = true
        has_projects                = false
        has_wiki                    = false
        homepage_url                = "https://chaotic-ground.github.io/wikven/"
        html_url                    = "https://github.com/chaotic-ground/wikven"
        http_clone_url              = "https://github.com/chaotic-ground/wikven.git"
        id                          = "wikven"
        is_template                 = false
        merge_commit_message        = "PR_BODY"
        merge_commit_title          = "PR_TITLE"
        name                        = "wikven"
        node_id                     = "R_kgDOGgu7aQ"
        primary_language            = "PHP"
        private                     = false
        repo_id                     = 436976489
        squash_merge_commit_message = "PR_BODY"
        squash_merge_commit_title   = "PR_TITLE"
        ssh_clone_url               = "git@github.com:chaotic-ground/wikven.git"
        svn_url                     = "https://github.com/chaotic-ground/wikven"
        topics                      = [
            "docker-image",
            "mediawiki",
            "static-site-generator",
            "wikitext",
        ]
        visibility                  = "public"
        web_commit_signoff_required = false
    }

  # github_repository_pages.this will be imported
  # (imported from "wikven")
    resource "github_repository_pages" "this" {
        api_url        = "https://api.github.com/repos/chaotic-ground/wikven/pages"
        build_status   = "building"
        build_type     = "legacy"
        custom_404     = false
        html_url       = "https://chaotic-ground.github.io/wikven/"
        https_enforced = true
        id             = "436976489"
        public         = true
        repository     = "wikven"
        repository_id  = 436976489

        source {
            branch = "gh-pages"
            path   = "/"
        }
    }

  # github_repository_ruleset.default will be updated in-place
  # (imported from "wikven:17638220")
  ~ resource "github_repository_ruleset" "default" {
        enforcement = "active"
        etag        = "W/\"7247befdf74eb78cd34e8c2b625d103b0f7d305605aa81d878121a67b809edb9\""
        id          = "17638220"
        name        = "default"
        node_id     = "RRS_lACqUmVwb3NpdG9yec4aC7tpzgENI0w"
        repository  = "wikven"
        ruleset_id  = 17638220
        target      = "branch"

        conditions {
            ref_name {
                exclude = []
                include = [
                    "~DEFAULT_BRANCH",
                ]
            }
        }

      ~ rules {
            creation                      = false
            deletion                      = true
            non_fast_forward              = true
            required_linear_history       = false
            required_signatures           = false
            update                        = false
            update_allows_fetch_and_merge = false

            pull_request {
                allowed_merge_methods             = [
                    "merge",
                    "squash",
                    "rebase",
                ]
                dismiss_stale_reviews_on_push     = false
                require_code_owner_review         = false
                require_last_push_approval        = false
                required_approving_review_count   = 0
                required_review_thread_resolution = false
            }

          ~ required_status_checks {
                do_not_enforce_on_create             = false
                strict_required_status_checks_policy = false

                required_check {
                    context        = "biome"
                    integration_id = 15368
                }
                required_check {
                    context        = "caddy"
                    integration_id = 15368
                }
                required_check {
                    context        = "composer-test"
                    integration_id = 15368
                }
                required_check {
                    context        = "coverage"
                    integration_id = 15368
                }
                required_check {
                    context        = "mago"
                    integration_id = 15368
                }
                required_check {
                    context        = "phan (REL1_46)"
                    integration_id = 15368
                }
                required_check {
                    context        = "phan (master)"
                    integration_id = 15368
                }
                required_check {
                    context        = "phpcs"
                    integration_id = 15368
                }
                required_check {
                    context        = "phpunit (REL1_46)"
                    integration_id = 15368
                }
                required_check {
                    context        = "phpunit (master)"
                    integration_id = 15368
                }
                required_check {
                    context        = "rumdl"
                    integration_id = 15368
                }
                required_check {
                    context        = "semantic-pull-request"
                    integration_id = 15368
                }
                required_check {
                    context        = "taplo"
                    integration_id = 15368
                }
                required_check {
                    context        = "typos"
                    integration_id = 15368
                }
                required_check {
                    context        = "yamllint"
                    integration_id = 15368
                }
                required_check {
                    context        = "zizmor"
                    integration_id = 15368
                }
              + required_check {
                  + context        = "docker-image"
                  + integration_id = 15368
                }
              + required_check {
                  + context        = "smoke"
                  + integration_id = 15368
                }
            }
        }
    }

Plan: 3 to import, 0 to add, 1 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so OpenTofu can't
guarantee to take exactly these actions if you run "tofu apply" now.

View run

@lens0021 lens0021 changed the title ci: name jobs after what they do ci: name jobs and workflow files after what they do Aug 15, 2026
lens0021 and others added 2 commits August 15, 2026 23:49
A job name is the status check context, so it is read in the ruleset's list
next to biome, phpcs and phpunit, where `build` and `build-and-check` say
nothing. Renames only, no behaviour change:

  build            -> docker-image
  build-and-check  -> smoke
  build-and-deploy -> deploy-pages

The first two are required contexts, so the ruleset has to drop the old names
before this merges and pick up the new ones after.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BJtGZbbjBAHWmnC4QQyRUj
The file name is what a reader scans first, so it should agree with the
workflow and its job:

  docker-build.yml -> docker-image.yml   (workflow "Docker image", job docker-image)
  tf.yml           -> tofu.yml           (workflow "Tofu")

Also drops .github/workflows/dependencies, a stray file from be87a48 that
holds a fragment of phan's Gadgets config. GitHub ignores it; it is not a
workflow.

.tf/ruleset.tf carries the renamed contexts, since the required checks are
declared there, not in the web UI.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BJtGZbbjBAHWmnC4QQyRUj
@lens0021
lens0021 force-pushed the ci/specific-job-names branch from 62742df to b136dff Compare August 15, 2026 14:49
@lens0021
lens0021 merged commit 5223646 into main Aug 15, 2026
21 checks passed
@lens0021
lens0021 deleted the ci/specific-job-names branch August 15, 2026 14:53
lens0021 added a commit that referenced this pull request Aug 15, 2026
The two shipped composite actions sat at the repo root as `action/` and
`action-check/`, sorting apart from each other and reading as leftovers.
They move to `actions/bake/` and `actions/check-translations/`, each
directory named after what the action does, the way #354 named the
workflows.

Breaking for anyone referencing `chaotic-ground/wikven/action@<ref>`:
that becomes `chaotic-ground/wikven/actions/bake@<ref>`. The docs
example moves with it. Still v0, so this is the moment to do it.

Renaming the paths meant auditing the config keyed on them, which turned
up two things that were already broken:

- release-please only listed `action/action.yml` as an extra file, so
the `x-release-please-version` pin in the check action has never been
stamped. Both are listed now.
- Dependabot

🤖 Generated with [Claude Code](https://claude.com/claude-code)'s
`github-actions` entry is `directory: /`, which scans
`.github/workflows` and a root `action.yml` only. Neither composite
action was ever in its view, and `git log --author=dependabot --
action/action.yml` is empty to prove it. It is `directories: [/,
/actions/*]` now, so the glob picks up whatever lands there next.

`pr-preview` and `deploy-docs` also gained `actions/bake/**` in their
path filters. The preview build is the only thing anywhere that runs
that action, and it was not watching it, which is the same shape of bug
#344 just fixed for the binary.

Verified: `yamllint --strict .` passes, the release-please config still
parses, and a repo-wide grep finds no surviving reference to the old
paths. Because this touches `docs/`, `pr-preview` runs on this PR and
exercises `./actions/bake` from its new location.

Not done here: `docs/Deploying/ko.wikitext` carries the old
`tree/main/action` link and will go fuzzy and 404 until someone updates
ko. Translating is not the code contributor's job. The check action is
still run by no CI anywhere, which is worth its own issue.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant