From 896b782346242c8a32b9c79d983eca4d097a3ea8 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Mon, 7 Jun 2021 10:09:25 +0200 Subject: [PATCH] add authentication --- .github/workflows/prerelease.yml | 1 + .github/workflows/release.yml | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index a1eb296db3..8333fdd111 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -81,6 +81,7 @@ jobs: git commit -m "[Automated] Bump version" tag_name="CI/${{ steps.version.outputs.next_tag }}" git tag -a $tag_name -m "nightly build" + git remote set-url --push origin https://pypebot:${{ secrets.ADMIN_TOKEN }}@github.com/pypeclub/openpype git push git push origin $tag_name diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 782c9c8dda..8dba526739 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,7 @@ jobs: git fetch git checkout -b main origin/main git tag -d ${GITHUB_REF#refs/*/} + git remote set-url --push origin https://pypebot:${{ secrets.ADMIN_TOKEN }}@github.com/pypeclub/openpype git push origin --delete ${GITHUB_REF#refs/*/} echo PREVIOUS_VERSION=`git describe --tags --match="[0-9]*" --abbrev=0` >> $GITHUB_ENV @@ -45,7 +46,7 @@ jobs: id: generate-full-changelog uses: heinrichreimer/github-changelog-generator-action@v2.2 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.ADMIN_TOKEN }} breakingLabel: '#### 💥 Breaking' enhancementLabel: '#### 🚀 Enhancements' bugsLabel: '#### 🐛 Bug fixes' @@ -76,12 +77,13 @@ jobs: tag_name="${{ env.RELEASE_VERSION }}" git push git tag -fa $tag_name -m "stable release" + git remote set-url --push origin https://pypebot:${{ secrets.ADMIN_TOKEN }}@github.com/pypeclub/openpype git push origin $tag_name - name: "🚀 Github Release" uses: docker://antonyurchenko/git-release:latest env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }} DRAFT_RELEASE: "false" PRE_RELEASE: "false" CHANGELOG_FILE: "CHANGELOG.md" @@ -93,7 +95,7 @@ jobs: uses: everlytic/branch-merge@1.1.0 if: steps.version_type.outputs.type != 'skip' with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.ADMIN_TOKEN }} source_ref: 'main' target_branch: 'develop' commit_message_template: '[Automated] Merged release {source_ref} into {target_branch}' \ No newline at end of file