feat: add pull request set workflows (#1824)

* feat: add pull request set workflows

* Update pull-request.yml
pull/1825/head
Xinwei Xiong 10 months ago committed by GitHub
parent c86df88b59
commit e79532aa93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,13 +14,8 @@
name: Github Pull Request name: Github Pull Request
on: on:
push:
branches: [main]
paths-ignore:
- 'README.md'
- 'CONTRIBUTING.md'
- 'docs/**'
workflow_dispatch: workflow_dispatch:
push:
schedule: schedule:
- cron: '0 2 * * *' - cron: '0 2 * * *'
@ -37,24 +32,18 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Get League branch Patch
run: |
git config user.name 'openimbot'
git config user.email 'openimsdk@qq.com'
BRANCH_NAME="auto-pr-$(date +'%Y%m%d%H%M%S')"
git checkout -b $BRANCH_NAME
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v4 uses: actions/setup-go@v4
- name: Run go modules tidy - name: Run go modules tidy
run: | run: |
sudo apt-get install jq
sudo make tidy sudo make tidy
sudo make tools.verify.go-gitlint sudo make tools.verify.go-gitlint
echo "Run go modules tidy successfully" echo "Run go modules tidy successfully"
continue-on-error: true continue-on-error: true
- name: Run go format - name: Run go format and lint
run: | run: |
sudo make format sudo make format
echo "Run go format successfully" echo "Run go format successfully"
@ -69,9 +58,16 @@ jobs:
- name: Generate all necessary files, such as error code files - name: Generate all necessary files, such as error code files
run: | run: |
make generate make generate
./scripts/init-config.sh --examples --force
echo "Generate all necessary files successfully" echo "Generate all necessary files successfully"
continue-on-error: true continue-on-error: true
- name: Generate Vertions
run: |
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1` | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
echo $latest_tag > pkg/common/config/version
continue-on-error: true
- name: Run unit test and get test coverage - name: Run unit test and get test coverage
run: | run: |
make cover make cover
@ -90,13 +86,13 @@ jobs:
with: with:
token: ${{ secrets.BOT_GITHUB_TOKEN }} token: ${{ secrets.BOT_GITHUB_TOKEN }}
commit-message: "cicd: bump League Patch" commit-message: "cicd: bump League Patch"
author: kubbot <kubbot@3293172751ysy@gmail.com> author: kubbot <3293172751ysy@gmail.com>
signoff: false committer: kubbot <3293172751ysy@gmail.com>
draft: false # signoff: false
branch: '' # draft: false
branch: "asf-auto-updates"
assignees: cubxxw assignees: cubxxw
reviewers: cubxxw reviewers: cubxxw
delete-branch: true
title: "Bump League Patch auto PR: $(date +'%Y%m%d')" title: "Bump League Patch auto PR: $(date +'%Y%m%d')"
body: | body: |
Review criteria: Review criteria:
@ -105,7 +101,6 @@ jobs:
This is an automated PR. @ $(date +'%Y%m%d') This is an automated PR. @ $(date +'%Y%m%d')
<sub>[workflow](https://github.com/openimsdk/open-im-server/blob/main/.github/workflows/pull-request.yml).</sub> <sub>[workflow](https://github.com/openimsdk/open-im-server/blob/main/.github/workflows/pull-request.yml).</sub>
base: main
labels: | labels: |
kind/documentation kind/documentation
enhancement enhancement

Loading…
Cancel
Save