A GitHub app which allow trigger action on issue comment.
This app based on a probot solution.
name: 'Triggered from comment'
on:
repository_dispatch:
types: [BuildUniqueTitle]
jobs:
one:
runs-on: ubuntu-latest
steps:
- name: 'Dump GitHub context'
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
./sA 'BuildUniqueTitle' [args]
Supports all types of args single/double quoted.
Name | Description |
---|---|
client_payload.pComment |
Original comment body without ./sA |
client_payload |
The full copy of original payload. |
How to find the id of a comment will depend a lot on the use case?
Everything can be touched via ${{ github.event.client_payload }}
object which contains full copy of context.payload
and cleaned comment.body
string.
For allowing access to certain groups of users use (bit-) sum of needed value:
String | Int representation |
---|---|
COLLABORATOR | 1 |
CONTRIBUTOR | 2 |
FIRST_TIMER | 4 |
FIRST_TIME_CONTRIBUTOR | 8 |
MEMBER | 16 |
NONE | 32 |
OWNER | 64 |
For example for allowing running Actions only for OWNER(64) and COLLABORATOR's(1) you should set value to 65 = 1+64.
Append this value to file: .github/.RunActionOnCommitAccess
, attention don't add any extra symbols to file.
Value cached for 120s.
Actual link: https://github.com/afwn90cj93201nixr2e1re/RunActionOnCommit/blob/master/DEFAULT_BITS.md