Skip to content

Commit

Permalink
fix(workflows): Squash all daily commits in a single one
Browse files Browse the repository at this point in the history
  • Loading branch information
craciunoiuc authored May 6, 2023
1 parent 9ea0ee1 commit 351583a
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/stats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,22 @@ jobs:
ghtoken: ${{ secrets.REPO_STATS }}
databranch: repo_stats

# squash-all-new-commits:
# name: squash-new-commits
# if: ${{ always() }}
# needs: [j1, run-ghrs-with-matrix]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repo
# uses: actions/checkout@v3
# with:
# ref: 'repo_stats'
#
# - name: Clone & Move to stats branch
# run: |
# git reset --soft $(git log --date=format:'%Y-%m-%d %H:%M:%S' | grep -B 2 $(date --date="yesterday" '+%F') | head -1 | cut -d' ' -f2-)
# git config --global user.email "[email protected]"
# git config --global user.name "GitHub Action"
# git commit -s -m "Add statistics for $(date '+%F')"
# git push
squash-all-new-commits:
name: squash-new-commits
if: ${{ always() }}
needs: [j1, run-ghrs-with-matrix]
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: 'repo_stats'

- name: Clone & Move to stats branch
run: |
# git reset --soft $(git log --date=format:'%Y-%m-%d %H:%M:%S' | grep -B 2 $(date --date="yesterday" '+%F') | head -1 | cut -d' ' -f2-)
git reset --soft HEAD~6
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git commit -s -m "Add statistics for $(date '+%F')"
git push

0 comments on commit 351583a

Please sign in to comment.