Git Subtree Push #8
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: Git Subtree Push | |
on: | |
workflow_dispatch: | |
# no inputs at this time | |
jobs: | |
subtree-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
# Based on https://github.com/rust-lang/rustup/issues/3409 | |
# rustup should already be installed in GitHub Actions. | |
- name: install current toolchain with rustup | |
run: | | |
CURRENT_TOOLCHAIN=$(cut -d ' ' -f3 <<< $(cat rust-toolchain | grep "channel =") | tr -d '"') | |
rustup install $CURRENT_TOOLCHAIN --no-self-update | |
- name: Setup Rustfmt Bot Git Details | |
run: | | |
git config user.name "rustfmt bot" | |
git config user.email "rustfmt@sync.bot" | |
- name: subtree-push | |
env: | |
# Need to set the `GH_TOKEN` env variable so we can use the GitHub CLI in `/ci/subtree_sync.sh` | |
GH_TOKEN: ${{ github.token }} | |
run: ${GITHUB_WORKSPACE}/ci/subtree_sync.sh subtree-push |