Skip to content

Commit

Permalink
Create sync.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerheart86 authored Oct 19, 2023
1 parent 96c981c commit 6e83d76
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/sync.yaml
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

0 comments on commit 6e83d76

Please sign in to comment.