Skip to content

Commit b9325b7

Browse files
feat: Moving the job to seperate action so that we can test it easily. (#5013)
* setting the github_token explicitly to see if that solves the problem. Signed-off-by: lrangine <[email protected]> * Moving the job to seperate action so that we can test it easily. Signed-off-by: lrangine <[email protected]> --------- Signed-off-by: lrangine <[email protected]>
1 parent 3834ffa commit b9325b7

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Update Stable Branch
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
token:
7+
description: 'GitHub token to authenticate'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
update_stable_branch:
13+
name: Update Stable Branch after release
14+
runs-on: ubuntu-latest
15+
env:
16+
GITHUB_TOKEN: ${{ github.event.inputs.token }}
17+
GIT_AUTHOR_NAME: feast-ci-bot
18+
GIT_AUTHOR_EMAIL: [email protected]
19+
GIT_COMMITTER_NAME: feast-ci-bot
20+
GIT_COMMITTER_EMAIL: [email protected]
21+
GITHUB_REPOSITORY: ${{ github.repository }}
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
with:
26+
persist-credentials: false
27+
28+
- name: Set up Git credentials
29+
run: |
30+
git config --global user.name "$GIT_AUTHOR_NAME"
31+
git config --global user.email "$GIT_AUTHOR_EMAIL"
32+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
33+
34+
- name: Fetch all branches
35+
run: git fetch --all
36+
37+
- name: Reset stable branch to match release branch
38+
run: |
39+
git checkout -B stable origin/${GITHUB_REF#refs/heads/}
40+
git push origin stable --force

0 commit comments

Comments
 (0)