Skip to content

Commit

Permalink
Update update-example-hub.yaml, first try to remove existing contents
Browse files Browse the repository at this point in the history
  • Loading branch information
elray1 committed Jun 8, 2023
1 parent 2681a5c commit 7ef620d
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/update-example-hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@ jobs:
runs-on: ubuntu-latest

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout hubEnsembles
uses: actions/checkout@v3


- name: Checkout update_example_simple_forecast_hub branch, remove existing
run: |
git fetch --all
git branch update_example_simple_forecast_hub
git checkout update_example_simple_forecast_hub
git rm -R inst/example-data/example-simple-forecast-hub/
working-directory: ./hubEnsembles

- name: Checkout example-simple-forecast-hub
uses: actions/checkout@v3
with:
Expand All @@ -24,15 +32,12 @@ jobs:
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
echo "Committing files..."
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
git push https://${GITHUB_TOKEN}@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 }}

0 comments on commit 7ef620d

Please sign in to comment.