Skip to content

update cargo to use the correct revision #310

update cargo to use the correct revision

update cargo to use the correct revision #310

name: Pin submodule and run codegen
on:
workflow_dispatch:
inputs:
commit-id:
description: |
Commit ID of the submodule.
If ommited, HEAD will be used.
required: false
type: string
repository_dispatch:
types: [biome-push-on-main-event]
permissions:
actions: write
contents: write
pull-requests: write
jobs:
pin-submodule-and-run-codegen:
runs-on: ubuntu-latest
concurrency:
group: "pin-submodule-and-run-codegen-${{ github.event_name }}"
cancel-in-progress: true
steps:
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
submodules: true
- name: Get commit ID of submodule (workflow dispatch, non-empty)
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.commit-id != '' }}
run: echo "COMMIT_ID=${{ github.event.inputs.commit-id }}" >> $GITHUB_ENV
- name: Get commit ID of submodule (repository dispatch)
if: ${{ github.event_name == 'repository_dispatch'}}
run: echo "COMMIT_ID=${{ github.event.client_payload.event.head_commit.id }}" >> "$GITHUB_ENV"
- name: Get short commit ID
run: echo "SHORT_COMMIT_ID=$(echo ${{ env.COMMIT_ID }} | cut -c 1-7)" >> "$GITHUB_ENV"
- name: Run codegen
uses: ./.github/actions/run-codegen
with:
kinds: metadata, rules
version: "0.0.0"
revision: &{{ env.COMMIT_ID }}

Check failure on line 43 in .github/workflows/pin-submodule-and-run-codegen.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/pin-submodule-and-run-codegen.yaml

Invalid workflow file

You have an error in your yaml syntax on line 43
- name: Create pull request
id: create-pull-request
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
with:
branch: "chore/pin-submodule-and-run-codegen-${{ github.event_name }}"
author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
title: "chore(ci): pin submodule to `${{ env.SHORT_COMMIT_ID }}` and run codegen"
commit-message: "chore(ci): pin submodule to `${{ env.SHORT_COMMIT_ID }}` and run codegen"
body: "Pin submodule to [`${{ env.SHORT_COMMIT_ID }}`](https://github.com/biomejs/biome/commit/${{ env.COMMIT_ID }}) and run codegen."
labels: CI-Submodule
- 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 }}