Skip to content

go-openapi/gh-actions

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

gh-actions

Tests CI vuln scan CodeQL

Release Go Report Card CodeFactor Grade License

GoDoc Slack Channelslack-badge go version Top language Commits since latest release


GitHub Actions used by go-openapi workflows.

Status

These actions are currently used by the CI workflows run at github.com/go-openapi.

Usage

To use this action in your workflow, reference it using the standard GitHub Actions syntax:

  • Install all tools
- uses: go-openapi/[email protected]
  • Install each tool independently
- uses: go-openapi/gh-actions/install/[email protected]
- uses: go-openapi/gh-actions/install/[email protected]
- uses: go-openapi/gh-actions/install/[email protected]
- uses: go-openapi/gh-actions/install/[email protected]
  • Download a specific version
- uses: go-openapi/gh-actions/install/[email protected]
  with:
    version: v0.0.12

Installed tools

All tools are currently installed using downloaded released binaries.

Background

CI workflows may use and pin released actions instead of resorting to a go install ...@latest command.

This is mostly motivated by the need to pin CI dependencies to a specific commit and use only vetted versions of the installed tooling.

Our actions try to install tools from binary releases whenever applicable.

Automated version tracking is obtained thanks to a dummy go.mod module declaration in this repo, which allows dependabot to track our target tools and post updates.

A vulnerability scan on the source repo of the tools must be passed for such an update to be approved and merged.

Additional reusable actions

  • wait-pending-jobs: an action that waits for all jobs to have run (not just status checks) on a PR
- uses: go-openapi/gh-actions/ci-jobs/[email protected]
  with:
    pr-url: ${{ github.event.pull_request.html_url }}
    github-token: ${{ secrets.GITHUB_TOKEN }}
    # Optional: exclude the current run (default: true)
    exclude-current-run: 'true'
    # Optional: patterns to match workflow names for exclusion (default: 'auto-merge,contributors')
    exclude-workflow-patterns: 'auto-merge,release'

Background

This action solves a timing issue where:

  1. Auto-merge triggers as soon as required status checks pass
  2. Non-required jobs (like coverage upload) are still running
  3. The PR gets merged and branch deleted while jobs are still in progress
  4. Running jobs fail because the branch no longer exists

When multiple jobs in the same workflow use this action in parallel (e.g., both dependabot and actions-bot jobs), they can end up waiting for each other. The action includes smart defaults to prevent deadlocks:

  • exclude-current-run: Automatically excludes the current workflow run from the wait list (default: true)
  • exclude-workflow-patterns: Case-insensitive pattern matching against workflow names (default: 'auto-merge,contributors')
    • Patterns use substring matching: 'auto-merge' matches 'Dependabot auto-merge', 'PR auto-merge', etc.
    • Override the default by providing your own comma-separated list of patterns

Change log

See https://github.com/go-openapi/gh-actions/releases

Licensing

This library ships under the SPDX-License-Identifier: Apache-2.0.

Other documentation

Cutting a new release

Maintainers can cut a new release by either:

  • running this workflow
  • or pushing a semver tag
    • signed tags are preferred
    • The tag message is prepended to release notes

About

github actions used by go-openapi workflows

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published