Update Worked-Example-Miner-Candidates Submodule #943
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
name: Update Worked-Example-Miner-Candidates Submodule | |
on: | |
schedule: | |
# Runs at the start of every hour | |
- cron: '0 * * * *' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
update-submodule: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
# Fetches all history for all tags and branches, including submodules | |
fetch-depth: 0 | |
submodules: 'recursive' | |
- name: Configure git settings | |
run: | | |
git config --global pull.rebase false | |
git config --global user.email "[email protected]" | |
git config --global user.name "Breno Farias da Silva" | |
- name: Forcefully update Worked-Example-Miner-Candidates submodule to the latest version | |
run: | | |
cd Worked-Example-Miner-Candidates | |
git fetch origin main | |
git checkout main | |
git reset --hard origin/main | |
- name: Return to main repository and check for changes | |
run: | | |
git add Worked-Example-Miner-Candidates | |
git diff --cached --quiet || git commit -m "UPDATE: Automatically updated Worked-Example-Miner-Candidates submodule to the latest version." | |
- name: Push changes if any | |
run: | | |
git push origin main || echo "No changes to push." |