From 618c077a0a14eef827563b54501d287095ad3f55 Mon Sep 17 00:00:00 2001 From: "Kavitha.Raju" Date: Mon, 17 Jul 2023 09:46:57 +0530 Subject: [PATCH] Fix cicd bot's push rights to version-2: trail #1 --- .github/workflows/deploy_release.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy_release.yml b/.github/workflows/deploy_release.yml index b41bf10d..3de8da16 100644 --- a/.github/workflows/deploy_release.yml +++ b/.github/workflows/deploy_release.yml @@ -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: