-
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
Showing
15 changed files
with
26 additions
and
4 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 |
---|---|---|
|
@@ -6,23 +6,39 @@ jobs: | |
cron: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Git clone | ||
uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
- name: Build | ||
|
||
- name: Fetch | ||
env: | ||
PAT: ${{ secrets.PAT }} | ||
shell: bash | ||
run: ./scripts/fetch.sh | ||
|
||
- name: Score | ||
env: | ||
PAT: ${{ secrets.PAT }} | ||
shell: bash | ||
run: | | ||
today=$(./scripts/utils/today.sh) | ||
sevenDaysAgo=$(./scripts/utils/sevenDaysAgo.sh) | ||
echo $today | ||
echo $sevenDaysAgo | ||
./scripts/score.sh data/$today data/$sevenDaysAgo | ||
sort -nr score-output > data/"$today"-score | ||
rm score-output | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: extract_branch | ||
|
||
- name: GitHub Commit & Push | ||
uses: actions-js/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ steps.extract_branch.outputs.branch }} | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
rm score-output | ||
echo "Scoring $1 <- $2" | ||
|
||
declare -A stars | ||
|
||
|
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,5 @@ | ||
current_date=$(date +%s) | ||
seven_days=$((7 * 24 * 60 * 60)) | ||
seven_days_ago=$((current_date - seven_days)) | ||
seven_days_ago_date=$(date -d "@$seven_days_ago" +%d-%m-%Y) | ||
echo $seven_days_ago_date |
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 @@ | ||
echo $(date +"%d-%m-%Y") |