Skip to content

Commit

Permalink
reconnaissance
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowmegaman committed Mar 2, 2020
0 parents commit dfa3001
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
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"]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# gh-build-canceller
11 changes: 11 additions & 0 deletions action.yml
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 }}
13 changes: 13 additions & 0 deletions entrypoint.sh
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'

0 comments on commit dfa3001

Please sign in to comment.