seua871 / revert

A GitHub Action to automatically revert a commit on a '/revert' comment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub Action to revert a commit via a comment

After installation, comment /revert <commit_sha> to trigger the action.

revert

Installation

workflow "Automatic Revert" {
  on = "issue_comment"
  resolves = "Revert"
}

action "Revert" {
  uses = "srt32/revert@master"
  secrets = ["GITHUB_TOKEN"]
}

If you are using new yml format for workflow file

name: Automatic Revert

on:
  issue_comment:
    types: [created]

jobs:
  revert-commit:

    runs-on: ubuntu-latest

    if: contains(github.event.comment.body, '/revert')

    steps:
      - uses: actions/checkout@v1
      - name: Automatic Revert
        uses: srt32/revert@v0.0.1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

This Action is heavily inspired by rebase.

About

A GitHub Action to automatically revert a commit on a '/revert' comment

License:MIT License


Languages

Language:Shell 77.8%Language:Dockerfile 22.2%