kotatogram-desktop/.github/workflows/master_updater.yml
RadRussianRus 6b983c89d2 Make master branch updater work
secrets.GITHUB_TOKEN doesn't have "workflow" permission, if master contains any, it won't update.
2020-05-12 08:02:02 +03:00

27 lines
669 B
YAML

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.WORKFLOW_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!"