mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 07:48:32 +00:00
aab4ba5874
Some checks are pending
Build docker image / build-and-push (push) Waiting to run
Build pro image / build-and-push (push) Waiting to run
Deploy client docs / Build (push) Waiting to run
E2E / Build (push) Waiting to run
E2E / Core and plugins (push) Blocked by required conditions
E2E / plugin-workflow (push) Blocked by required conditions
E2E / plugin-workflow-approval (push) Blocked by required conditions
E2E / plugin-data-source-main (push) Blocked by required conditions
E2E / Comment on PR (push) Blocked by required conditions
NocoBase frontEnd test / frontend-test (18) (push) Waiting to run
56 lines
2.0 KiB
YAML
56 lines
2.0 KiB
YAML
name: Auto merge main -> next
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.inputs.repository }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
repository:
|
|
description: 'Please enter a repository name'
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
|
|
jobs:
|
|
push-commit:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/create-github-app-token@v1
|
|
id: app-token
|
|
with:
|
|
app-id: ${{ vars.NOCOBASE_APP_ID }}
|
|
private-key: ${{ secrets.NOCOBASE_APP_PRIVATE_KEY }}
|
|
repositories: nocobase,pro-plugins,plugin-pro-tpl,${{ join(fromJSON(vars.NEXT_PRO_PLUGIN_REPOS), ',') }},${{ join(fromJSON(vars.CUSTOM_PRO_PLUGIN_REPOS), ',') }}
|
|
skip-token-revoke: true
|
|
- name: Get GitHub App User ID
|
|
id: get-user-id
|
|
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
|
|
env:
|
|
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: nocobase/${{ inputs.repository || 'nocobase' }}
|
|
token: ${{ steps.app-token.outputs.token }}
|
|
persist-credentials: true
|
|
fetch-depth: 0
|
|
- name: main -> next(${{ inputs.repository || 'nocobase' }})
|
|
run: |
|
|
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
|
|
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
|
|
git checkout main
|
|
git pull origin main
|
|
git checkout next
|
|
git merge main
|
|
git push origin next
|
|
- name: push ${{ inputs.repository || 'nocobase' }}(next)
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
branch: next
|
|
github_token: ${{ steps.app-token.outputs.token }}
|
|
repository: nocobase/${{ inputs.repository || 'nocobase' }}
|
|
tags: true
|
|
atomic: true
|