Skip to content

chore: revise workflows and documentation - #79

Open
burigolucas wants to merge 1 commit into
redhat-cop:mainfrom
burigolucas:ci/revise-workflows-for-forks
Open

chore: revise workflows and documentation#79
burigolucas wants to merge 1 commit into
redhat-cop:mainfrom
burigolucas:ci/revise-workflows-for-forks

Conversation

@burigolucas

Copy link
Copy Markdown
Contributor

Description

This PR improves the fork contributor CI experience by introducing a two-tier workflow architecture and automating the full CI setup for forks.

Two-tier CI for PRs

  • Adds a new Tier 1 ansible-lint.yml workflow that runs on all PRs (including forks) without requiring secrets or maintainer approval. It uses a new .ansible-lint-ci config that mocks private Red Hat collection modules and roles (redhat.openshift.k8s, ansible.controller.*, etc.), enabling lint feedback immediately for external contributors.
  • Tier 2 (full CI with AUTOMATION_HUB_TOKEN) continues to require maintainer approval for fork PRs, as before.
  • pre-commit.yml now explicitly skips the ansible-lint hook (SKIP=ansible-lint) to avoid duplication with the dedicated Tier 1 workflow.

Fork CI (ci-fork.yml)

  • New workflow that lets fork contributors run the complete test suite (full ansible-lint, sanity tests, integration tests) directly in their fork before opening a PR upstream — no waiting for maintainer approval.
  • Requires only AUTOMATION_HUB_TOKEN configured as a fork repository secret.
  • Includes a sync-tags job that automatically creates the latest upstream version tag in the fork on every push. This satisfies the changelog-lint job's version resolution requirement without any manual steps. The tag is pointed at the fork's default branch HEAD to avoid the GITHUB_TOKEN workflow OAuth scope restriction.

Trigger and workflow revisions

  • pre-commit.yml now also triggers on push to non-main/v2 branches so fork contributors get pre-commit feedback before opening a PR.
  • gitleaks.yml trigger broadened to run on all pushes (not just main/v2).
  • Concurrency groups added to pr-title-validation.yml, pre-commit.yml, ansible-lint.yml, and gitleaks.yml to cancel superseded runs.
  • All workflows upgraded to actions/checkout@v6.

Other

  • Pins tox>=4.15.1,<4.28 in test-requirements.txt to avoid a regression in tox 4.28+ that rejects env names like py313-2.18 (interprets the collection version as a Python version).
  • Updates the PR description template (.github/pull_request_template.md).
  • Updates CONTRIBUTING.md with a full explanation of the two-tier CI architecture and a step-by-step fork CI setup guide.

Type of Change

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation changes
  • style: Formatting, missing semi colons, etc; no code change
  • refactor: Refactoring production code
  • test: Adding missing tests, refactoring tests; no production code change
  • chore: Updating configs, etc; no production code change

Pull Request Title

Note: Please ensure your PR title follows Conventional Commits.
Example: feat: add role

  • I have formatted my PR title correctly.

- added tier 1 workflow for ansible-lint in tolerant mode
- added concurrency on all tier 1 workflows
- extend documentation to explain reasoning for 2 phases workflows
- enabled ci workflow in forks
- enable pre-commit workflow in forks
- use public container image in CI
- document requirement of manual syncing tags in forks
- automatically fetch tags from upstream
- revise workflow triggers
- upgrade actions/checkout to v6
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