Skip to content

Commit 3c9758a

Browse files
committed
ci: Make action proper
1 parent 968301a commit 3c9758a

File tree

2 files changed

+54
-38
lines changed

2 files changed

+54
-38
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -229,44 +229,6 @@ jobs:
229229
message: |
230230
⚠️ This PR is opened against **master**. You probably want to open it against **develop**.
231231
232-
job_external_contributor:
233-
name: External Contributors
234-
needs: job_install_deps
235-
runs-on: ubuntu-20.04
236-
if: |
237-
github.event_name == 'pull_request'
238-
&& (github.event.action == 'opened' || github.event.action == 'reopened')
239-
&& github.event.pull_request.author_association != 'COLLABORATOR'
240-
&& github.event.pull_request.author_association != 'MEMBER'
241-
&& github.event.pull_request.author_association != 'OWNER'
242-
steps:
243-
- uses: actions/checkout@v4
244-
with:
245-
ref: ${{ github.head_ref }}
246-
- name: Set up Node
247-
uses: actions/setup-node@v4
248-
with:
249-
node-version-file: 'package.json'
250-
- name: Check dependency cache
251-
uses: actions/cache/restore@v4
252-
with:
253-
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
254-
key: ${{ needs.job_install_deps.outputs.dependency_cache_key }}
255-
fail-on-cache-miss: true
256-
257-
- name: Add external contributor to CHANGELOG.md
258-
uses: ./dev-packages/external-contributor-gh-action
259-
with:
260-
name: ${{ github.event.pull_request.user.login }}
261-
- name: Create PR with changes
262-
uses: peter-evans/create-pull-request@v6
263-
with:
264-
commit-message: "ref: Add external contributor to CHANGELOG.md"
265-
title: "ref: Add external contributor to CHANGELOG.md"
266-
branch: 'external-contributor/patch-${{ github.event.pull_request.user.login }}'
267-
delete-branch: true
268-
body: This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution.
269-
270232
job_build:
271233
name: Build
272234
needs: [job_get_metadata, job_install_deps]
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: "CI: Mention external contributors"
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
branches:
7+
- develop
8+
9+
env:
10+
NX_CACHE_RESTORE_KEYS: |
11+
nx-Linux-${{ github.ref }}-${{ github.sha }}
12+
nx-Linux-${{ github.ref }}
13+
nx-Linux
14+
15+
jobs:
16+
external_contributor:
17+
name: External Contributors
18+
runs-on: ubuntu-20.04
19+
if: |
20+
github.event.pull_request.author_association != 'COLLABORATOR'
21+
&& github.event.pull_request.author_association != 'MEMBER'
22+
&& github.event.pull_request.author_association != 'OWNER'
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
ref: ${{ github.head_ref }}
27+
- name: Set up Node
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version-file: 'package.json'
31+
cache: 'yarn'
32+
33+
- name: Install dependencies
34+
run: yarn install --frozen-lockfile
35+
- name: NX cache
36+
uses: actions/cache/restore@v4
37+
with:
38+
path: .nxcache
39+
key: nx-Linux-${{ github.ref }}-${{ github.sha }}
40+
restore-keys: ${{ env.NX_CACHE_RESTORE_KEYS }}
41+
42+
- name: Add external contributor to CHANGELOG.md
43+
uses: ./dev-packages/external-contributor-gh-action
44+
with:
45+
name: ${{ github.event.pull_request.user.login }}
46+
- name: Create PR with changes
47+
uses: peter-evans/create-pull-request@v6
48+
with:
49+
commit-message: "ref: Add external contributor to CHANGELOG.md"
50+
title: "ref: Add external contributor to CHANGELOG.md"
51+
branch: 'external-contributor/patch-${{ github.event.pull_request.user.login }}'
52+
delete-branch: true
53+
body: This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution.
54+

0 commit comments

Comments
 (0)