rerun-actions

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2021 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

rerun-actions

A GitHub Action that re-runs other Action Workflows via PR comment commands.

How it works

Once a PR is submitted against a repo with GitHub Actions enabled, a workflow will run. If that workflow fails, it can be rerun by POST-ing to the Actions API. rerun-actions reruns workflows by parsing the body of a PR comment (specified by the comment's id retrieved from an issue_comment webhook event) for certain commands and rerunning jobs matching those commands.

Some notes:

  • The PR either must have an ok-to-test label present on the PR, or the user who writes a command must be an organization member, or repo owner, contributor, or collaborator.
    • Typically ok-to-test can/should only be applied by repo reviewers/approvers to prevent spam and abuse.
  • rerun-actions should only be run on comment creation. See the below examples for how to do this.

Comment commands

These commands are named after

  • /retest - rerun all failed workflows.
  • /test <workflow name> - rerun a specific failed workflow. Only one workflow name can be specified. Multiple /test commands are allowed per comment.

Caveat: because of Action limitations, only failed workflows can be rerun.

Examples

Example workflow file (use this config verbatim):

on:
  issue_comment:
    types: [created]

jobs:
  rerun_pr_tests:
    name: rerun_pr_tests
    if: ${{ github.event.issue.pull_request }}
    runs-on: ubuntu-18.04
    steps:
    - uses: estroz/rerun-actions@main
      with:
        repo_token: ${{ secrets.GITHUB_TOKEN }}
        comment_id: ${{ github.event.comment.id }}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址