Skip to content

Commit

Permalink
ci: add fixture regeneration CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-gang committed Dec 23, 2024
1 parent caa1360 commit 91be247
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/fixtures.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Trigger Fixture Regeneration

on:
pull_request:
types:
- labeled

jobs:
trigger_pipeline:
if: github.event.label.name == 'regenerate-fixtures'
runs-on: ubuntu-latest

permissions:
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.22.x

- name: Regenerate Fixtures
run: CODECRAFTERS_RECORD_FIXTURES=true make test

- uses: actions-ecosystem/action-create-comment@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
body: |
Triggered [a CircleCI job](${{ steps.trigger_circleci_pipeline.outputs.pipeline_url }}) to update fixtures.
- uses: actions-ecosystem/action-remove-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: regenerate-fixtures

0 comments on commit 91be247

Please sign in to comment.