Skip to content

First result commit

First result commit #3

Workflow file for this run

name: Push 'latest.csv' to public repo
on:
push:
paths:
- 'processed/latest.csv'
jobs:
commit-latest:
runs-on: ubuntu-latest
steps:
- name: Checkout source repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Git user for the action
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: Clone only the master branch of the target repository
run: |
git clone --single-branch --branch master https://github.com/GrupoDaMudanca/cod-results.git target-repo
env:
GITHUB_TOKEN: ${{ secrets.PUSH_COD_RESULTS_TOKEN }}
- name: Copy the latest.csv file to the target repository
run: |
cp processed/latest.csv target-repo/latest.csv
- name: Commit and push changes to the target repository
run: |
cd target-repo
git add latest.csv
git commit -m "Update data $(date -u '+%Y-%m-%d %T') UTC"
git push origin master
env:
GITHUB_TOKEN: ${{ secrets.PUSH_COD_RESULTS_TOKEN }}