Skip to content

Commit

Permalink
move away from direct commits (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf authored Apr 30, 2024
1 parent 75000c6 commit 490470e
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,24 @@ jobs:
&& python gts_regional_metrics.py
&& python gts_atn_metrics.py
- name: Commit and push if it changed
- name: Create Pull Request
if: github.ref == 'refs/heads/main'
run: >
git config user.name "Automated"
&& git config user.email "[email protected]"
&& git add -A
&& timestamp=$(date -u)
&& git commit -m "Latest data: ${timestamp}" || exit 0
&& git push
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Latest data: $(date -u)"
branch: update-webpage
delete-branch: true
title: "[metrics-ci] webpage auto-update"
body: |
Metrics Webpage auto-udpate.
labels: |
New: Pull Request
Bot
- name: Check outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 comments on commit 490470e

Please sign in to comment.