-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96c981c
commit 6e83d76
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Sync with Gosh | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Only a single commit is fetched by default, for the ref/SHA that | ||
# triggered the workflow. Set fetch-depth: 0 to fetch all history for | ||
# all branches and tags. | ||
fetch-depth: 0 | ||
|
||
- name: Sync | ||
env: | ||
CONFIG_JSON: ${{ secrets.CONFIG_JSON }} | ||
GOSH_URL: ${{ vars.GOSH_URL }} | ||
GOSH_TMP_BRANCH: github_${{ github.ref_name }} | ||
run: | | ||
git --version | ||
wget -O - https://raw.githubusercontent.com/gosh-sh/gosh/dev/install.sh | TAG=6.1.35 bash -s | ||
echo "$CONFIG_JSON" >~/.gosh/config.json | ||
export PATH=$HOME/.gosh:$PATH | ||
git pull | ||
git remote add gosh $GOSH_URL | ||
git switch -C $GOSH_TMP_BRANCH | ||
git remote -v | ||
git status | ||
git push -vv gosh |