From bfdeeb20488138bf016a71f099a3c63ecec19b04 Mon Sep 17 00:00:00 2001 From: lrangine <19699092+lokeshrangineni@users.noreply.github.com> Date: Tue, 4 Feb 2025 15:39:25 -0500 Subject: [PATCH 1/2] setting the github_token explicitly to see if that solves the problem. Signed-off-by: lrangine <19699092+lokeshrangineni@users.noreply.github.com> --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d76be8506f1..09fe7152dcf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -191,6 +191,7 @@ jobs: GIT_AUTHOR_EMAIL: feast-ci-bot@willem.co GIT_COMMITTER_NAME: feast-ci-bot GIT_COMMITTER_EMAIL: feast-ci-bot@willem.co + GITHUB_REPOSITORY: ${{ github.repository }} steps: - name: Checkout code uses: actions/checkout@v4 @@ -201,6 +202,7 @@ jobs: run: | git config --global user.name "$GIT_AUTHOR_NAME" git config --global user.email "$GIT_AUTHOR_EMAIL" + git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} - name: Fetch all branches run: git fetch --all From 9aaded7b19e0f01cd1af60d2f93fcc7d82ce3c6a Mon Sep 17 00:00:00 2001 From: lrangine <19699092+lokeshrangineni@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:10:31 -0500 Subject: [PATCH 2/2] Moving the job to seperate action so that we can test it easily. Signed-off-by: lrangine <19699092+lokeshrangineni@users.noreply.github.com> --- .github/workflows/update_stable_branch.yml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/update_stable_branch.yml diff --git a/.github/workflows/update_stable_branch.yml b/.github/workflows/update_stable_branch.yml new file mode 100644 index 00000000000..b09af9cc2eb --- /dev/null +++ b/.github/workflows/update_stable_branch.yml @@ -0,0 +1,40 @@ +name: Update Stable Branch + +on: + workflow_dispatch: + inputs: + token: + description: 'GitHub token to authenticate' + required: true + type: string + +jobs: + update_stable_branch: + name: Update Stable Branch after release + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ github.event.inputs.token }} + GIT_AUTHOR_NAME: feast-ci-bot + GIT_AUTHOR_EMAIL: feast-ci-bot@willem.co + GIT_COMMITTER_NAME: feast-ci-bot + GIT_COMMITTER_EMAIL: feast-ci-bot@willem.co + GITHUB_REPOSITORY: ${{ github.repository }} + 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" + git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} + + - name: Fetch all branches + run: git fetch --all + + - name: Reset stable branch to match release branch + run: | + git checkout -B stable origin/${GITHUB_REF#refs/heads/} + git push origin stable --force