Skip to content

Do 2000+ GH contributions/year #799

Do 2000+ GH contributions/year

Do 2000+ GH contributions/year #799

Workflow file for this run

name: Do 2000+ GH contributions/year
on:
push:
branches: [ master ]
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt-get install jq curl -y
- name: Get total contributions
uses: octokit/graphql-action@v2.x
id: get_contributions
with:
query: |
query($owner: String!) {
user(login: $owner) {
contributionsCollection {
contributionCalendar {
totalContributions
}
}
}
}
owner: "hakatashi"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test if contibution requirement is satisfied
run: >-
echo "Current total contributions per year: ${{ env.CONTRIBUTIONS }}" &&
test ${{ env.CONTRIBUTIONS }} -ge 2000
env:
CONTRIBUTIONS: ${{ fromJSON(steps.get_contributions.outputs.data).user.contributionsCollection.contributionCalendar.totalContributions }}