mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Added Github Action that updates code in master branch.
This commit is contained in:
parent
dcf737bebe
commit
0c0fc46b90
1 changed files with 27 additions and 0 deletions
27
.github/workflows/master_updater.yml
vendored
Normal file
27
.github/workflows/master_updater.yml
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
name: Master branch updater.
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: released
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
updater:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
SKIP: "0"
|
||||||
|
to_branch: "master"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Push the code to the master branch.
|
||||||
|
run: |
|
||||||
|
url=https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
|
||||||
|
latest_tag=$(git describe --tags --abbrev=0)
|
||||||
|
echo "Latest tag: $latest_tag"
|
||||||
|
|
||||||
|
git remote set-url origin $url
|
||||||
|
git remote -v
|
||||||
|
git checkout master
|
||||||
|
git merge $latest_tag
|
||||||
|
|
||||||
|
git push origin HEAD:refs/heads/$to_branch
|
||||||
|
echo "Done!"
|
Loading…
Add table
Reference in a new issue