Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/daily-contest-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:

- name: Check if branch exists
run: |
branch_exists=$(git ls-remote --exit-code --heads origin automate-json-update || echo "")
branch_exists=$(git ls-remote --exit-code --heads origin automate-c-json-update || echo "")
if [ -n "$branch_exists" ]; then
git fetch origin automate-json-update
git checkout automate-json-update
git fetch origin automate-c-json-update
git checkout automate-c-json-update
else
git checkout -b automate-json-update
git checkout -b automate-c-json-update
fi

- name: Run contest.py script
Expand All @@ -40,15 +40,15 @@ jobs:
git config --local user.name "GitHub Action"
git add data/contests.json
git commit -m "Update JSON file"
git push origin automate-json-update
git push origin automate-c-json-update

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Automated pull request for JSON file update
title: Automated Pull Request
branch: automate-json-update
branch: automate-c-json-update
base: main
body: |
This pull request updates the JSON file automatically.