Skip to content

Commit

Permalink
fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosbosse committed Dec 3, 2024
1 parent 9b3806f commit 19bab33
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/submit-rsv-forecasts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
gh auth login --with-token <<< "${{ secrets.PRIVATE_ACCESS_TOKEN }}"
# Fork the repository (if not already forked)
gh repo fork cdcepi/FluSight-forecast-hub --clone=true || true
gh repo fork HopkinsIDD/rsv-forecast-hub --clone=true || true
# Sync the fork with upstream
pushd FluSight-forecast-hub
Expand All @@ -72,7 +72,7 @@ jobs:
git remote add upstream https://github.com/HopkinsIDD/rsv-forecast-hub.git 2>/dev/null || true
# Set the origin remote with authentication token
git remote set-url origin "https://${{ secrets.PRIVATE_ACCESS_TOKEN }}@github.com/${{ github.actor }}/rsv-forecast-hub.git"
git remote set-url origin "https://x-access-token:${{ secrets.PRIVATE_ACCESS_TOKEN }}@github.com/${{ github.actor }}/rsv-forecast-hub.git"
# Fetch and sync with upstream
git fetch upstream
Expand Down Expand Up @@ -113,12 +113,12 @@ jobs:
git commit -m "Update rsv forecasts $(date +%Y-%m-%d)"
# Set the remote URL with authentication token
git remote set-url origin "https://${{ secrets.PRIVATE_ACCESS_TOKEN }}@github.com/${{ github.actor }}/rsv-forecast-hub.git"
git remote set-url origin "https://x-access-token:${{ secrets.PRIVATE_ACCESS_TOKEN }}@github.com/${{ github.actor }}/rsv-forecast-hub.git"
# Force push to fork with the new unique branch
git push -f origin $BRANCH_NAME
# Create PR
# Create PR using gh cli
gh pr create \
--title "Submission Metaculus forecasts $(date +%Y-%m-%d)" \
--body "Automated rsv forecast submission from Metaculus" \
Expand All @@ -127,4 +127,5 @@ jobs:
--head "${{ github.actor }}:$BRANCH_NAME"
fi
env:
PRIVATE_ACCESS_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }}
GH_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }}

0 comments on commit 19bab33

Please sign in to comment.