From b3fd532e111daea53cea6f2901a5a9debae65711 Mon Sep 17 00:00:00 2001 From: justin Date: Thu, 18 Sep 2025 19:48:12 -0700 Subject: [PATCH 1/2] feat: add pushups check github action --- pushups-action/README.md | 18 ++++++++++++++++++ pushups-action/action.yml | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 pushups-action/README.md create mode 100644 pushups-action/action.yml diff --git a/pushups-action/README.md b/pushups-action/README.md new file mode 100644 index 0000000..6ee1bd1 --- /dev/null +++ b/pushups-action/README.md @@ -0,0 +1,18 @@ +# Check Git Pushups Action + +This composite GitHub Action verifies whether the author of a pull request has completed their daily pushups using the [GitPushups API](https://api.gitpushups.com). +If the user has not done their pushups for the current day, the action fails the workflow. + +## Usage + +```yaml +name: Pushup Check +on: [pull_request] + +jobs: + pushups: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: higgins/gitpushups.com/pushups-action@main +``` diff --git a/pushups-action/action.yml b/pushups-action/action.yml new file mode 100644 index 0000000..df09a88 --- /dev/null +++ b/pushups-action/action.yml @@ -0,0 +1,18 @@ +name: 'Check Git Pushups' +description: 'Fails if the pull request author has not completed their daily pushups.' +author: 'GitPushups' +runs: + using: 'composite' + steps: + - name: Verify pushups + shell: bash + run: | + AUTHOR="${{ github.event.pull_request.user.login }}" + echo "Checking pushups for $AUTHOR" + TODAY=$(date -u +%F) + RESULT=$(curl -fsSL "https://api.gitpushups.com/user/${AUTHOR}?local_date=${TODAY}" | jq -r '.didPushupsToday') + if [[ "$RESULT" != "true" ]]; then + echo "::error::$AUTHOR has not done pushups for $TODAY" + exit 1 + fi + echo "$AUTHOR has completed their pushups for $TODAY" From 439852e0efd1cbbe10c74135608fb8311518ab43 Mon Sep 17 00:00:00 2001 From: Justin Higgins Date: Thu, 18 Sep 2025 22:48:17 -0700 Subject: [PATCH 2/2] add workflow pushups check --- .github/workflows/pushups-check.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/workflows/pushups-check.yml diff --git a/.github/workflows/pushups-check.yml b/.github/workflows/pushups-check.yml new file mode 100644 index 0000000..45dccd3 --- /dev/null +++ b/.github/workflows/pushups-check.yml @@ -0,0 +1,9 @@ +name: Pushup Check +on: [pull_request] + +jobs: + pushups: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: higgins/gitpushups.com/pushups-action@main \ No newline at end of file