Skip to content

Commit

Permalink
ci: trigger ecosystem ci and website task from prepare_release_crates
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Jun 6, 2024
1 parent 08fdb26 commit 188d00a
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/prepare_release_crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Prepare Release Crates

on:
workflow_dispatch:
push:
branches:
- trigger-other-workflow

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -10,6 +13,7 @@ concurrency:
permissions:
pull-requests: write
contents: write
actions: write

jobs:
prepare_release:
Expand Down
39 changes: 38 additions & 1 deletion .github/workflows/prepare_release_oxlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,45 @@ permissions:
contents: write

jobs:
prepare_release:
prepare:
name: Prepare Release Oxlint
uses: ./.github/workflows/reusable_prepare_release.yml
with:
name: oxlint

ecosystem-ci:
needs: prepare
name: Trigger Ecosystem CI
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1

- uses: peter-evans/create-or-update-comment@v4
id: comment
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ needs.prepare.outputs.pull-request-number }}
body: Triggering Ecosystem CI https://github.com/oxc-project/oxlint-ecosystem-ci/actions/workflows/ecosystem-ci.yml

- uses: benc-uk/workflow-dispatch@v1
with:
repo: oxc-project/oxlint-ecosystem-ci
workflow: ecosystem-ci.yml
token: ${{ secrets.PAT }}
ref: main
inputs: '{ "issue-number": "${{ needs.prepare.outputs.pull-request-number }}", "comment-id": "${{ steps.comment.outputs.comment-id }}" }'

website:
needs: prepare
name: Update oxc.rs
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1

- uses: benc-uk/workflow-dispatch@v1
with:
repo: oxc-project/website
workflow: oxc-project/oxc-project.github.io
token: ${{ secrets.PAT }}
ref: main
inputs: '{ "issue-number": "${{ needs.prepare.outputs.pull-request-number }}" }'
6 changes: 6 additions & 0 deletions .github/workflows/reusable_prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
required: true
type: string
description: "The name defined in oxc_release.toml"
outputs:
pull-request-number:
value: ${{ jobs.run.outputs.pull-request-number }}

env:
CARGO_INCREMENTAL: 0
Expand All @@ -16,6 +19,8 @@ jobs:
run:
name: Prepare Release Crates
runs-on: ubuntu-latest
outputs:
pull-request-number: ${{ steps.pr.outputs.pull-request-number }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -59,6 +64,7 @@ jobs:
- run: cargo check

- uses: peter-evans/create-pull-request@v6
id: pr
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Release ${{ inputs.name }}
Expand Down

0 comments on commit 188d00a

Please sign in to comment.