Skip to content

Add ah lint GitHub Actions workflow for ArtifactHub validation #141

Description

@vdemeester

What

Add a GitHub Actions workflow that runs ah lint on PRs to validate ArtifactHub metadata before merge.

Why

We publish packages to ArtifactHub (tasks and stepactions each as separate AH repositories). The ah CLI tool can catch metadata issues (missing annotations, invalid artifacthub-repo.yaml, etc.) early in CI rather than discovering them after indexing.

How

Add a workflow (e.g. .github/workflows/artifacthub-lint.yaml) using the artifacthub/ah container image:

name: ArtifactHub Lint
on:
  pull_request:
    branches: [main]

jobs:
  ah-lint-tasks:
    runs-on: ubuntu-latest
    container:
      image: artifacthub/ah
      options: --user root
    steps:
      - uses: actions/checkout@v5
      - name: Lint tasks
        run: ah lint -k tekton-task -p task
  ah-lint-stepactions:
    runs-on: ubuntu-latest
    container:
      image: artifacthub/ah
      options: --user root
    steps:
      - uses: actions/checkout@v5
      - name: Lint stepactions
        run: ah lint -k tekton-task -p stepaction

The exact kind flags and paths may need adjustment — check ah lint --help for Tekton-specific options.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions