Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cicd bot's push rights to version-2: trail #1 #637

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,17 @@ jobs:
head -n 33 app/main.py | tail -n 4

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
default_author: github_actor
message: 'Bump version automatically on release'
add: './app/main.py'
push: 'origin HEAD:version-2 --force'

- name: Move release tag to latest commit
run: |
git tag -a $(git describe --tags --abbrev=0) -m "moving tag to new commit" -f $(git rev-parse HEAD)
git config --global user.name "${{ secrets.CICD_BOT_USER }}"
git config --global user.email "${{ secrets.CICD_BOT_EMAIL }}"
git config --global user.password "${{ secrets.CICD_BOT_PASS }}"
git add ./app/main.py
git commit -m 'Bump version automatically on release'
git push -f origin version-2

- name: Move release tag to latest commit
run: |
git tag -a $(git describe --tags --abbrev=0) -m "moving tag to new commit" -f $(git rev-parse HEAD)
git push -f origin refs/tags/$(git describe --tags --abbrev=0)

pull-n-deploy:
Expand Down