update-example-hub #8
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
on: workflow_dispatch | |
name: update-example-hub | |
jobs: | |
update-example-simple-forecast-hub: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout hubEnsembles | |
uses: actions/checkout@v3 | |
- name: Checkout example-simple-forecast-hub | |
uses: actions/checkout@v3 | |
with: | |
repository: 'Infectious-Disease-Modeling-Hubs/example-simple-forecast-hub' | |
ref: 'main' | |
path: './hubEnsembles/inst/example-data/example-simple-forecast-hub' | |
- name: Push files to GitHub | |
run: | | |
git config --global user.email "git@github.com" | |
git config --global user.name "Github Actions CI" | |
echo "Commiting files..." | |
git checkout -b update_example_simple_forecast_hub | |
rm -R inst/example-data/example-simple-forecast-hub/.git | |
git add inst/example-data/example-simple-forecast-hub | |
git commit -m "Github Actions build update example-simple-forecast-hub: $GITHUB_RUN_NUMBER" | |
echo "Pushing files..." | |
git push https://${GITHUB_PAT}@github.com/Infectious-Disease-Modeling-Hubs/hubEnsembles.git HEAD:update_example_simple_forecast_hub | |
echo "Submitting pull request..." | |
gh pr create --fill --base main --head update_example_simple_forecast_hub | |
working-directory: ./hubEnsembles | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |