From eba43f79dba3a9ede596a3ebf18a698c082bf165 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 13 May 2020 10:47:47 +0200 Subject: [PATCH] Add script for automatic push to standalone branch --- .github/workflows/update_standalone.yml | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/update_standalone.yml diff --git a/.github/workflows/update_standalone.yml b/.github/workflows/update_standalone.yml new file mode 100644 index 0000000..e4c1de3 --- /dev/null +++ b/.github/workflows/update_standalone.yml @@ -0,0 +1,33 @@ +on: + push: + branches: [develop] + +name: Update standalone branch + +env: + STANDALONE_BRANCH_NAME: standalone + +jobs: + update: + name: Update standalone branch + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup git + run: | + git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" + git config --global user.name "$GITHUB_ACTOR" + git fetch + - name: Create standalone version + run: | + bash tools/create_standalone.sh /tmp/nowide_standalone + git checkout "$STANDALONE_BRANCH_NAME" -- || git checkout -b "$STANDALONE_BRANCH_NAME" + git rm -r * + mv /tmp/nowide_standalone/* . + git add . + - name: Commit and push + run: | + git commit -am "Include '${{github.event.head_commit.message}}'" + remote_repo="https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git" + git push "$remote_repo" HEAD:$STANDALONE_BRANCH_NAME + \ No newline at end of file