-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit dfa3001
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM alpine:3.11.3 | ||
|
||
LABEL \ | ||
"name"="GitHub Pull Request Rechecker" \ | ||
"homepage"="https://github.com/marketplace/actions/github-pull-request-rechecker" \ | ||
"repository"="https://github.com/yellowmegaman/prtrigger" | ||
|
||
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \ | ||
apk add --no-cache git hub curl jq bash | ||
|
||
ADD *.sh / | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# gh-build-canceller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: 'GH actions stale run canceller' | ||
author: 'Dmitry Rozhdestvenskiy <[email protected]>' | ||
description: 'Shoots old builds' | ||
branding: | ||
icon: 'target' | ||
color: 'yellow' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.github_token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [[ -z "$GITHUB_TOKEN" ]]; then | ||
echo "Set the GITHUB_TOKEN environment variable." | ||
exit 1 | ||
fi | ||
|
||
|
||
env | sort | ||
|
||
# curl -s -H "authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" -X GET "https://api.github.com/repos/$GITHUB_REPOSITORY/pulls" | jq -r '.[].head.ref' |