Skip to content

Commit

Permalink
chore: Update pr-contributor-welcome.yml (ant-design#44340)
Browse files Browse the repository at this point in the history
* chore: Update pr-contributor-welcome.yml

Signed-off-by: afc163 <afc163@gmail.com>

* Apply suggestions from code review

Signed-off-by: afc163 <afc163@gmail.com>

---------

Signed-off-by: afc163 <afc163@gmail.com>
  • Loading branch information
afc163 authored Aug 22, 2023
1 parent 0295322 commit 4d12efe
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/pr-contributor-welcome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,32 @@ on:
- 'components/**'

jobs:
read-file:
runs-on: ubuntu-latest
outputs:
require-result: ${{ steps.contributors.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Read contributors.json
id: contributors
uses: juliangruber/read-file-action@v1
with:
path: ./contributors.json

output-log:
runs-on: ubuntu-latest
needs: read-file
steps:
- name: contributors.json
run: echo "${{ needs.read-file.outputs.require-result }}"
- name: creator
run: echo "${{ github.event.pull_request.user.login }}"
- name: contains
run: echo "${{ contains(fromJSON(needs.read-file.outputs.require-result), github.event.pull_request.user.login) }}"
- name: merged
run: echo "${{ github.event.pull_request.merged }}"

check-merged:
runs-on: ubuntu-latest
needs: read-file
Expand All @@ -25,4 +51,4 @@ jobs:
<img src="https://github.com/ant-design/ant-design/assets/5378891/e24c6080-bf38-4523-b1cd-f6c43ad7375f" height="200" />
<!-- WELCOME_CONTRIBUTION -->
body-include: '<!-- WELCOME_CONTRIBUTION -->'
body-include: '<!-- WELCOME_CONTRIBUTION -->'

0 comments on commit 4d12efe

Please sign in to comment.