Skip to content

Commit 4eb94ef

Browse files
authored
(fix) GitHub Actions fixes from repo refactor: npm -> pnpm, Node 14 -> 18 for remaining GH actions (#14723)
1 parent bb5906c commit 4eb94ef

File tree

9 files changed

+26
-18393
lines changed

9 files changed

+26
-18393
lines changed

.github/actions/git-diff-on-components/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ This action takes care of all components with dependencies that were modified bu
1515
### `all_files`
1616

1717
**Required** List of all files comming from `changed_files` step in `check_version` job github action workflow. It is necessary to set the action `Ana06/[email protected]` output in json format like
18+
1819
```
1920
...
2021
with:
2122
format: json
2223
```
24+
2325
in that way `steps.changed_files.outputs.all` will be converted in array of strings
2426

2527
## Example usage
@@ -34,8 +36,10 @@ in that way `steps.changed_files.outputs.all` will be converted in array of stri
3436
```
3537
3638
## Build
39+
3740
You need to push all files generated in `dist` folder once you are finished with the build to test the new version of the github action in case you want to make modifications.
41+
3842
```
3943
$ cd .github/actions/git-diff-on-components/
40-
$ npm i && npm run build
41-
```
44+
$ pnpm i && pnpm run build
45+
```

.github/actions/git-diff-on-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "dist/index.js",
66
"scripts": {
77
"clean": "rm -rf ./dist",
8-
"build": "npm run clean && ncc build src/index.js --license licenses.txt"
8+
"build": "pnpm run clean && ncc build src/index.js --license licenses.txt"
99
},
1010
"keywords": [],
1111
"author": "pipedream",

.github/workflows/components-pr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
run: pnpm install -r
7474
- name: Compile TypeScript
7575
id: compile
76-
run: npm run build > files.txt
76+
run: pnpm run build > files.txt
7777
- name: Get Changed Files
7878
id: files
7979
uses: Ana06/[email protected]
@@ -162,7 +162,7 @@ jobs:
162162
run: pnpm install -r
163163
- name: Compile TypeScript
164164
id: compile
165-
run: npm run build > files.txt
165+
run: pnpm run build > files.txt
166166
- name: Get Changed Files
167167
id: files
168168
uses: Ana06/[email protected]

.github/workflows/publish-components.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131
- name: Setup Node Env
3232
uses: actions/[email protected]
3333
with:
34-
node-version: 14
34+
node-version: 18
3535
registry-url: https://registry.npmjs.org/
3636
cache: 'pnpm'
3737
- name: Compile TypeScript
38-
run: npm run build
38+
run: pnpm run build
3939
- name: Install pd cli
4040
env:
4141
PD_API_KEY: ${{ secrets.PD_API_KEY }}
@@ -137,7 +137,7 @@ jobs:
137137
- name: Setup Node Env
138138
uses: actions/[email protected]
139139
with:
140-
node-version: 14
140+
node-version: 18
141141
registry-url: https://registry.npmjs.org/
142142
cache: 'pnpm'
143143
- name: Install Dependencies
@@ -154,7 +154,7 @@ jobs:
154154
echo "org_id = $PD_ORG_ID" >> $HOME/.config/pipedream/config
155155
- name: Compile TypeScript
156156
id: compile
157-
run: npm run build > files.txt
157+
run: pnpm run build > files.txt
158158
- name: Get Changed Files
159159
id: files
160160
uses: Ana06/[email protected]

.github/workflows/publish-marketplace-content.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Setup Node Env
3232
uses: actions/[email protected]
3333
with:
34-
node-version: 14
34+
node-version: 18
3535
registry-url: https://registry.npmjs.org/
3636
cache: 'pnpm'
3737
- name: Get Changed Files

.github/workflows/publish-packages.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- name: pnpm install
4646
run: pnpm install -r --no-frozen-lockfile
4747
- name: Compile TypeScript
48-
run: npm run build
48+
run: pnpm run build
4949
# See https://pnpm.io/using-changesets
5050
- name: Setup npmrc for pnpm publish
5151
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc

.github/workflows/publish-platform-package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: pnpm install
2525
run: pnpm install -r --no-frozen-lockfile
2626
- name: Compile TypeScript
27-
run: npm run build
27+
run: pnpm run build
2828
# See https://pnpm.io/using-changesets
2929
- name: Setup npmrc for pnpm publish
3030
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc

.github/workflows/pull-request-checks.yaml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,14 @@ jobs:
5050
- name: Checkout Code
5151
uses: actions/[email protected]
5252
with:
53-
# Full git history is needed to get a proper list of changed files
54-
# within `super-linter`
53+
# See https://github.com/actions/checkout#checkout-v2
54+
# This will be slow. The intent is to fetch all commits
55+
# since the merge-base (the commit where we branched off)
56+
# so we can check the git diff against all changed files.
57+
# By default, the checkout action only returns the last commit,
58+
# There's no native way to do this in the checkout action, so
59+
# we have to fetch the entire history. See
60+
# https://github.com/actions/checkout/issues/266#issuecomment-638346893
5561
fetch-depth: 0
5662
- uses: pnpm/[email protected]
5763
with:
@@ -72,20 +78,10 @@ jobs:
7278
- name: Setup Node Env
7379
uses: actions/[email protected]
7480
with:
75-
node-version: 18.18.0
81+
node-version: 18
7682
registry-url: https://registry.npmjs.org/
7783
cache: 'pnpm'
78-
# - name: Lint Code Base
79-
# uses: super-linter/super-linter/[email protected]
80-
# env:
81-
# DEFAULT_BRANCH: master
82-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83-
# JAVASCRIPT_ES_CONFIG_FILE: eslint.config.mjs
84-
# LINTER_RULES_PATH: /
85-
# VALIDATE_ALL_CODEBASE: false
86-
# VALIDATE_JAVASCRIPT_ES: true
87-
# VALIDATE_JSON: true
88-
# ESLint only on changed files (not the same as the above super-linter)
84+
# ESLint only on changed files
8985
- name: Get Changed Files (space-separated)
9086
id: changed_files_space
9187
uses: Ana06/[email protected]

0 commit comments

Comments
 (0)