From e51bddcc5bcad1c7b407f9dd3c121a3d9e475fe6 Mon Sep 17 00:00:00 2001 From: takurinton Date: Mon, 4 Sep 2023 10:24:32 +0900 Subject: [PATCH] Fix separate check changeset status (#1401) --- .github/actions/setup-yarn/action.yaml | 17 +++++++++++++++++ .github/workflows/changeset.yaml | 17 +++++++++++++++++ .github/workflows/check.yaml | 13 +------------ 3 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 .github/actions/setup-yarn/action.yaml create mode 100644 .github/workflows/changeset.yaml diff --git a/.github/actions/setup-yarn/action.yaml b/.github/actions/setup-yarn/action.yaml new file mode 100644 index 000000000..81e856e20 --- /dev/null +++ b/.github/actions/setup-yarn/action.yaml @@ -0,0 +1,17 @@ +name: setup-yarn +description: "Setup yarn" + +runs: + using: composite + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + - name: Use Node.js 18.x + uses: actions/setup-node@v3 + with: + node-version: 18.x + - name: install + shell: bash + run: make -f ci.mk install diff --git a/.github/workflows/changeset.yaml b/.github/workflows/changeset.yaml new file mode 100644 index 000000000..419c86fd0 --- /dev/null +++ b/.github/workflows/changeset.yaml @@ -0,0 +1,17 @@ +name: need changeset + +on: + pull_request: + paths: + - "src/**" + - ".github/workflows/changeset.yaml" + +jobs: + changeset: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-yarn + - name: check changesets + run: make -f ci.mk check_changesets + if: github.actor != 'dependabot[bot]' && github.actor != 'FluctMember' diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index b3e49cae1..8d4a8bb3e 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -8,18 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - name: Use Node.js 18.x - uses: actions/setup-node@v3 - with: - node-version: 18.x - - name: install - run: make -f ci.mk install - - name: check changesets - run: make -f ci.mk check_changesets - if: github.actor != 'dependabot[bot]' && github.actor != 'FluctMember' + - uses: ./.github/actions/setup-yarn - name: lint run: make -f ci.mk lint - name: test