Reusable workflows (workflow_call) and a composite action shared across DataKnife repositories (game server containers, GitLab mirrors, security scans).
Pin a tag (for example v1) in caller repos; avoid floating @main in branch protection once stable.
jobs:
verify:
uses: DataKnifeAI/github-workflows/.github/workflows/reusable-game-server-ci.yml@v1
secrets: inherit| Path | Purpose |
|---|---|
.github/actions/verify-game-server |
Shellcheck, Hadolint (configurable), Markdownlint, Yamllint, kubectl kustomize |
.github/actions/push-gitlab-mirror |
Shared git push to gitlab.com/{path}.git with oauth2 token |
reusable-game-server-ci.yml |
Single Verify job for PRs and main |
reusable-game-server-mirror.yml |
Verify gate + optional push to GitLab mirror on main |
reusable-gitlab-mirror-push.yml |
Reusable push-only mirror (call after your CI jobs succeed) |
reusable-game-server-security.yml |
Build image + Trivy SARIF upload (GitHub Security tab) |
For mirror workflows on pull requests, GITLAB_TOKEN may be absent; the reusable workflow declares that secret as optional so the verify gate still runs. The push job only runs on main and will fail there if the token is missing.
hadolint_dockerfile(defaultDockerfile)hadolint_dockerfile_secondary(default empty; set e.g.Dockerfile.stagingfor Windrose)hadolint_failure_threshold(defaulterror)markdownlint_config,yamllint_config(defaults match game-server repos)kustomize_path(defaultdeploy; set empty string to skip)
- Copy
.markdownlint.jsonc/.yamllint.ymlpatterns from an existing game server repo (or override via inputs). - Add a workflow that
uses:the reusable workflow withsecrets: inheritwhere needed. - For mirrors, pass
gitlab_mirror_pathand ensureGITLAB_TOKENexists on the caller repo.
MIT — see LICENSE.
