Skip to content

Commit

Permalink
changing the git credentials to false.
Browse files Browse the repository at this point in the history
Signed-off-by: lrangine <[email protected]>
  • Loading branch information
lokeshrangineni committed Feb 4, 2025
1 parent aeaf832 commit 5008100
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,33 @@ jobs:
if: github.event.inputs.dry_run == 'false'
run: |
npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p semantic-release semantic-release
- name: Updating `stable` branch after release.
update_stable_branch:
name: Update Stable Branch after release
runs-on: ubuntu-latest
needs: release
env:
GITHUB_TOKEN: ${{ github.event.inputs.token }}
GIT_AUTHOR_NAME: feast-ci-bot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: feast-ci-bot
GIT_COMMITTER_EMAIL: [email protected]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Git credentials
run: |
git config --global user.name "$GIT_AUTHOR_NAME"
git config --global user.email "$GIT_AUTHOR_EMAIL"
- name: Fetch all branches
run: git fetch --all

- name: Reset stable branch to match release branch
run: |
git fetch origin
# note that this checkout creates a branch called `stable` if it does not exist
git checkout -B stable
git reset --hard origin/${GITHUB_REF##*/}
git push -f origin stable
git checkout -B stable origin/${GITHUB_REF#refs/heads/}
git push origin stable --force

0 comments on commit 5008100

Please sign in to comment.