Skip to content

Commit

Permalink
move away from direct commits
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed Apr 17, 2024
1 parent 75000c6 commit ff40cdb
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,23 @@ jobs:
&& python gts_regional_metrics.py
&& python gts_atn_metrics.py
- name: Commit and push if it changed
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
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
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 ff40cdb

Please sign in to comment.