File tree Expand file tree Collapse file tree 2 files changed +62
-0
lines changed Expand file tree Collapse file tree 2 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 1+ titleOnly : true
2+
3+ types :
4+ - fix
5+ - feat
6+ - feature
7+ - fixes
8+ - chore
9+ - perf
10+ - docs
11+ - doc
12+ - release
13+ - misc
Original file line number Diff line number Diff line change 1+ name : Creating PR using Multi-Gitter
2+
3+ on :
4+ pull_request :
5+ types : [opened]
6+ branches :
7+ - develop
8+ - main
9+
10+ jobs :
11+ update-dependencies :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@v2
16+
17+ - name : Set up Go
18+ uses : actions/setup-go@v4
19+ with :
20+ go-version : ' >=1.17.0'
21+
22+ - name : Install multi-gitter
23+ run : curl -s https://raw.githubusercontent.com/lindell/multi-gitter/b62a2dfda0ed266502f7c71f7ce79f8fd9c26bf6/install.sh | sh
24+
25+ - name : Get PR details
26+ env :
27+ HEAD_BRANCH : ${{ github.event.pull_request.head.ref }}
28+ BASE_BRANCH : ${{ github.event.pull_request.base.ref }}
29+ COMMIT_SHA : ${{ github.event.pull_request.head.sha }}
30+ PR_AUTHOR : ${{ github.event.pull_request.user.login }}
31+ PR_AUTHOR_ID : ${{ github.event.pull_request.user.id }}
32+ run : |
33+ echo "HEAD_BRANCH=$HEAD_BRANCH" >> $GITHUB_ENV
34+ echo "BASE_BRANCH=$BASE_BRANCH" >> $GITHUB_ENV
35+ echo "COMMIT_SHA=$COMMIT_SHA" >> $GITHUB_ENV
36+ echo "PR_AUTHOR=$PR_AUTHOR" >> $GITHUB_ENV
37+ echo "PR_AUTHOR_ID=$PR_AUTHOR_ID" >> $GITHUB_ENV
38+ echo "PR_AUTHOR_EMAIL=${PR_AUTHOR_ID}+${PR_AUTHOR}@users.noreply.github.com" >> $GITHUB_ENV
39+
40+ - name : Update script with PR details
41+ run : |
42+ sed -i 's/VERSION=.*/VERSION=${{ env.COMMIT_SHA }}/' .github/scripts/update-version.sh
43+
44+ - name : Run multi-gitter
45+ env :
46+ GITEA_TOKEN : ${{ secrets.GITEA_TOKEN }}
47+ run : |
48+ chmod +x .github/scripts/update-version.sh
49+ multi-gitter run .github/scripts/update-version.sh --token "$GITEA_TOKEN" --base-branch "$BASE_BRANCH" --branch "$HEAD_BRANCH" --author-name "$PR_AUTHOR" --author-email "$PR_AUTHOR_EMAIL" --pr-title "fix: sync with changes from $HEAD_BRANCH of common-lib" --config .github/config/multi-gitter-config
You can’t perform that action at this time.
0 commit comments