From 261ab030e0a060a4fc6652efd568dcefef4b97a5 Mon Sep 17 00:00:00 2001 From: m-jahn Date: Thu, 5 Mar 2026 13:24:58 +0100 Subject: [PATCH 1/3] fix: more information --- README.md | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3b5f322..f2b47b4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ - # MPUSP GitHub Actions This repository contains reusable GitHub Actions workflows for the [MPUSP](https://www.mpusp.mpg.de/), the Max Planck Unit for the Science of Pathogens. @@ -10,17 +9,33 @@ Their main purpose is to secure a harmonized, easy-to-maintain, and up-to-date c ## Usage -To use these workflows in your repository, reference them in your workflow files: +To use these workflows in your repository, reference them in your workflow files like this (example for `release-please`): ```yaml +on: + push: + branches: [main] + +permissions: + contents: write + pull-requests: write + issues: write + jobs: - my-job: - uses: mpusp/mpusp-github-actions/.github/workflows/workflow-name.yml@main + release-please: + uses: MPUSP/mpusp-github-actions/.github/workflows/release-please.yml@main ``` +It is possible to optionally give it a `name:`, otherwise the name from the called workflow is used. + ## Workflows -Documentation for individual workflows coming soon. +Currently available workflows include: + +- `snakemake-tests`: Runs standardized tests for Snakemake workflows. +- `deploy-apptainer`: Builds and deploys Apptainer containers for Snakemake workflows to GitHub Packages ([GHCR](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry)). **Note**: work in progress, use carefully! +- `release-please`: Automates the release process using the [release-please](https://github.com/googleapis/release-please) tool. +- `conventional-prs`: Lints pull requests for conventional commit messages. ## Contributing From 24535f6b7518015f84a7e3f82b39f9571ac0c8ec Mon Sep 17 00:00:00 2001 From: m-jahn Date: Fri, 6 Mar 2026 08:49:21 +0100 Subject: [PATCH 2/3] fix: added in-depth docs for wf usage --- README.md | 83 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 75 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f2b47b4..06fbb73 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,64 @@ This repository contains reusable GitHub Actions workflows for the [MPUSP](https These workflows are designed to streamline CI processes across MPUSP projects by providing standardized, reusable automation templates. Their main purpose is to secure a harmonized, easy-to-maintain, and up-to-date collection of reusable CI workflows for our [Snakemake pipelines](https://github.com/orgs/MPUSP/repositories). +## Workflows + +Currently available workflows include: + +- `snakemake-tests`: Runs standardized tests for Snakemake workflows. +- `deploy-apptainer`: Builds and deploys Apptainer containers for Snakemake workflows to GitHub Packages ([GHCR](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry)). **Note**: work in progress, use carefully! +- `release-please`: Automates the release process using the [release-please](https://github.com/googleapis/release-please) tool. +- `conventional-prs`: Lints pull requests for conventional commit messages. + ## Usage -To use these workflows in your repository, reference them in your workflow files like this (example for `release-please`): +To use these workflows in your repository, reference them in your workflow files as outlined below. +Note: workflows can be pinned to a specific version tag (`@v1.0`), but it is recommended to use the latest stable version (`@main`) in order to keep manual intervention in workflows to a minimum. + +### Snakemake Tests + +```yaml +name: Snakemake Tests + +on: + pull_request: + branches: [main] + +jobs: + snakemake-tests: + uses: MPUSP/mpusp-github-actions/.github/workflows/snakemake-tests.yml@main + with: + cores: 2 + dryrun: false +``` + +### Deploy Apptainer + +```yaml +name: Deploy Apptainer + +on: + workflow_run: + workflows: ["Release Please"] + types: + - completed + workflow_dispatch: + +permissions: + contents: read + packages: write + +jobs: + deploy-apptainer: + if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} + uses: MPUSP/mpusp-github-actions/.github/workflows/deploy-apptainer.yml@main +``` + +### Release Please ```yaml +name: Release Please + on: push: branches: [main] @@ -26,18 +79,32 @@ jobs: uses: MPUSP/mpusp-github-actions/.github/workflows/release-please.yml@main ``` -It is possible to optionally give it a `name:`, otherwise the name from the called workflow is used. +### Conventional PRs -## Workflows +```yaml +name: Conventional PRs -Currently available workflows include: +on: + pull_request_target: + types: + - opened + - reopened + - edited + - synchronize -- `snakemake-tests`: Runs standardized tests for Snakemake workflows. -- `deploy-apptainer`: Builds and deploys Apptainer containers for Snakemake workflows to GitHub Packages ([GHCR](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry)). **Note**: work in progress, use carefully! -- `release-please`: Automates the release process using the [release-please](https://github.com/googleapis/release-please) tool. -- `conventional-prs`: Lints pull requests for conventional commit messages. +permissions: + pull-requests: read + +jobs: + conventional-prs: + uses: MPUSP/mpusp-github-actions/.github/workflows/conventional-prs.yml@main +``` ## Contributing For issues and comments, please leave an issue on [Github](https://github.com/MPUSP/mpusp-github-actions/issues). For further questions, please contact bioinformatics@mpusp.mpg.de. + +## Authors + +- MPUSP bioinformatics team (http://mpusp.github.io/) From 04ca7132e6a6ae148c0c2239280556fe7b0b0e45 Mon Sep 17 00:00:00 2001 From: m-jahn Date: Fri, 6 Mar 2026 08:50:22 +0100 Subject: [PATCH 3/3] feat: added a separate YAML lint workflow only for the content of this repo --- .github/workflows/yaml-formatting.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/yaml-formatting.yml diff --git a/.github/workflows/yaml-formatting.yml b/.github/workflows/yaml-formatting.yml new file mode 100644 index 0000000..bc1e951 --- /dev/null +++ b/.github/workflows/yaml-formatting.yml @@ -0,0 +1,20 @@ +name: YAML Workflow Formatting + +on: + pull_request: + branches: [main] + +jobs: + Formatting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Formatting + uses: super-linter/super-linter@v8 + env: + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_YAML_PRETTIER: true