Update-Core-Commit #16
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-Core-Commit | |
on: | |
# Currently this workflow only runs when triggered manually. Perhaps we can set it up to run when a tag is pushed. Or when a release is made. Or that it could create a release, on a release it can create a tag? | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: "Use main branch for regular releases, legacy-support for 1.8x fixes." | |
required: false | |
type: choice | |
default: "main" | |
options: | |
- "main" | |
- "legacy-support" | |
jobs: | |
tasks: | |
name: Update core commit | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.branch }} | |
# Sets up python3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Run bump script | |
run: | | |
echo "Updating core commit" | |
python scripts/fetch_core_commit.py | |
echo "Finished" | |
- name: setup git config | |
run: | | |
# setup the username and email. | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
- name: commit-legacy | |
run: | | |
# Stage the file, commit and push | |
git add pretext/__init__.py | |
git commit -m "update to latest core commit" | |
git push origin ${{ inputs.branch }} |