diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-10-21 15:59:35 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-10-21 15:59:35 +0300 |
commit | 2b9a755dfef319c3919ee56944ff28bef8fb1991 (patch) | |
tree | e773837eb5b42494806b20a8c4c8ac5a04af158f | |
parent | d8a7f62409bfd09dc7347794c893821a0b06c005 (diff) |
Add manually-triggered branch-off workflow
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r-- | .github/workflows/branch_off.yml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/.github/workflows/branch_off.yml b/.github/workflows/branch_off.yml new file mode 100644 index 00000000..9ac363b7 --- /dev/null +++ b/.github/workflows/branch_off.yml @@ -0,0 +1,20 @@ +on: workflow_dispatch + +permissions: + contents: write + +name: Branch off +jobs: + branch-off: + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install xmllint + run: sudo apt-get install -y libxml2-utils + - name: Branch off and push + run: | + branch=`xmllint --xpath "//version/text()" appinfo/info.xml | awk -F \. {'print "stable" $1 "." $2'}` + git checkout -b $branch + git push origin $branch |