test12 #13
Workflow file for this run
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
# This is a basic workflow that is manually triggered | |
name: Subtree Push | |
# Controls when the action will run. Workflow runs when manually triggered using the UI | |
# or API. | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- main | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
subtree-push: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
# Runs a single command using the runners shell | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Echo and change directory | |
run: | | |
echo "This PR will be merged" | |
ls -al | |
cd ${GITHUB_WORKSPACE} | |
ls -al | |
- name: git config | |
run: | | |
cp .git/config .git/config-original | |
git config --global url."https://api:${{ secrets.ACTION_TOKEN }}@github.com/".insteadOf "https://github.com/" | |
git config --unset http."https://github.com/".extraheader | |
- name: Push Subtree | |
run: | | |
git subtree push --prefix=lib https://github.com/dongmin-ra/subtree_test_slave.git main | |
- name: git config back | |
run: | | |
cp -f .git/config-original .git/config |