-
-
Notifications
You must be signed in to change notification settings - Fork 96
53 lines (51 loc) · 1.79 KB
/
run-codegen.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Run codegen
on:
workflow_dispatch:
inputs:
kinds:
description: Which kinds of codegen to run
type: string
required: true
default: metadata, rules
version:
description: The version of Biome
type: string
required: true
default: "0.0.0"
permissions:
actions: write
contents: write
pull-requests: write
jobs:
run-codegen:
runs-on: ubuntu-latest
concurrency:
group: "run-codegen-${{ github.event_name }}"
cancel-in-progress: true
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
submodules: true
- name: Run codegen
uses: ./.github/actions/run-codegen
with:
kinds: ${{ inputs.kinds }}
version: ${{ inputs.version }}
- name: Create pull request
id: create-pull-request
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
with:
branch: "chore/run-codegen-${{ github.event_name }}"
author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
title: "chore(ci): run codegen ${{ inputs.kinds }}"
commit-message: "chore(ci): run codegen ${{ inputs.kinds }}"
body: |
Run codegen ${{ inputs.kinds }}.
`BIOME_VERSION=${{ inputs.version }}`
labels: CI-Codegen
- name: Auto merge
if: ${{ steps.create-pull-request.outputs.pull-request-operation != 'closed' && steps.create-pull-request.outputs.pull-request-number != '' }}
run: gh pr merge --squash --auto --delete-branch ${{ steps.create-pull-request.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}