Run codegen #1
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
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 }} |