-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(build): update Makefile and CI
- Loading branch information
Showing
4 changed files
with
20 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ name: Release | |
|
||
on: | ||
push: | ||
branches: | ||
- release | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
release: | ||
|
@@ -40,7 +40,7 @@ jobs: | |
- name: Lookup release version | ||
id: lookup_release_version | ||
run: | | ||
echo "::set-output name=release_version::$(grep -v '^#' ./release-version)" | ||
echo "::set-output name=release_version::$(git describe --tags --dirty --always)" | ||
- name: Build UI | ||
env: | ||
REACT_APP_MIXPANEL_TOKEN: ${{ secrets.REACT_APP_MIXPANEL_TOKEN }} | ||
|
@@ -85,78 +85,3 @@ jobs: | |
asset_path: ./embedded-assets-golang.zip | ||
asset_name: embedded-assets-golang.zip | ||
asset_content_type: application/zip | ||
pd_pr: | ||
if: "!contains(github.event.head_commit.message, 'skip pd_pr')" | ||
name: Create PD PR | ||
runs-on: ubuntu-latest | ||
needs: release | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
branch: [master, release-5.4, release-6.1] | ||
steps: | ||
- name: Check out PD code base | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: tikv/pd | ||
ref: ${{ matrix.branch }} | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: "1.18" | ||
- name: Load go module cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
key: ${{ runner.os }}-go-pd-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go-pd- | ||
- name: Update TiDB Dashboard in PD code base | ||
run: | | ||
go get -d "github.com/pingcap/tidb-dashboard@${{ needs.release.outputs.release_version }}" | ||
go mod tidy | ||
make pd-server | ||
go mod tidy | ||
cd tests/client | ||
go mod tidy | ||
cd ../.. | ||
- name: Commit PD code base change | ||
id: git_commit | ||
run: | | ||
git diff | ||
git config user.name "tidb-dashboard-bot" | ||
git config user.email "[email protected]" | ||
git add . | ||
if git status | grep -q "Changes to be committed" | ||
then | ||
git commit --signoff --message "Update TiDB Dashboard to ${{ needs.release.outputs.release_version }}, ref #4257" | ||
echo "::set-output name=committed::1" | ||
else | ||
echo "No changes detected, skipped" | ||
fi | ||
- name: Set build ID | ||
id: build_id | ||
run: echo "::set-output name=id::$(date +%s)" | ||
- name: Create PR based on PD code base | ||
uses: peter-evans/create-pull-request@v3 | ||
if: steps.git_commit.outputs.committed == 1 | ||
with: | ||
token: ${{ secrets.BOT_PAT }} | ||
branch: update-tidb-dashboard/${{ matrix.branch }}-${{ needs.release.outputs.release_version }}-${{ steps.build_id.outputs.id }} | ||
title: Update TiDB Dashboard to ${{ needs.release.outputs.release_version }} [${{ matrix.branch }}] | ||
body: | | ||
### What problem does this PR solve? | ||
Issue Number: ref #4257 | ||
This is an automatic updating PR for TiDB Dashboard. See #4257 for details. | ||
This PR updates TiDB Dashboard to ${{ needs.release.outputs.release_version }} for upstream commit: https://github.com/${{ github.repository }}/commit/${{ github.sha }} . | ||
### Release note | ||
```release-note | ||
None | ||
``` | ||
push-to-fork: tidb-dashboard-bot/pd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters