Skip to content

Commit d44dda8

Browse files
committed
Add new action
1 parent 7e0a32b commit d44dda8

File tree

6 files changed

+680
-8
lines changed

6 files changed

+680
-8
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Git diff on components action
2+
3+
This action takes care of all components with dependencies that were modified but the version was not incremented.
4+
5+
## Inputs
6+
7+
### `base_commit`
8+
9+
**Required** Base commit SHA.
10+
11+
### `head_commit`
12+
13+
**Required** Head commit SHA.
14+
15+
### `all_files`
16+
17+
**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+
19+
```
20+
...
21+
with:
22+
format: json
23+
```
24+
25+
in that way `steps.changed_files.outputs.all` will be converted in array of strings
26+
27+
## Example usage
28+
29+
```yaml
30+
- name: Check git diff for version changes
31+
uses: ./.github/actions/git-diff-on-components
32+
with:
33+
all_files: ${{ steps.changed_files.outputs.all }}
34+
base_commit: ${{ github.event.pull_request.base.sha }}
35+
head_commit: ${{ github.event.pull_request.head.sha }}
36+
```
37+
38+
## Build
39+
40+
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+
42+
```
43+
$ cd .github/actions/git-diff-on-components/
44+
$ pnpm i && pnpm run build
45+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "Push registry app files to Supabase"
2+
description: "Push registry app files that have changed to Supabase. If any *app.ts files have changed, run pnpm build for the affected app to generate the *.app.mjs file."
3+
inputs:
4+
base_commit:
5+
description: "Base commit SHA"
6+
required: true
7+
head_commit:
8+
description: "Head commit SHA"
9+
required: true
10+
all_files:
11+
description: "List of all files coming from changed_files step in push_to_supabase job of a github action workflow"
12+
required: true
13+
runs:
14+
using: "node16"
15+
main: "dist/index.js"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "push-registry-app-files-supabase",
3+
"version": "1.0.1",
4+
"description": "Push registry app files to Supabase",
5+
"main": "dist/index.js",
6+
"scripts": {
7+
"clean": "rm -rf ./dist",
8+
"build": "pnpm run clean && ncc build src/index.js --license licenses.txt"
9+
},
10+
"keywords": [],
11+
"author": "pipedream",
12+
"license": "ISC",
13+
"dependencies": {
14+
"@actions/core": "^1.9.0",
15+
"@actions/exec": "^1.1.1",
16+
"@vercel/ncc": "^0.34.0",
17+
"dependency-tree": "^8.1.2",
18+
"lodash.difference": "^4.5.0",
19+
"lodash.uniqwith": "^4.5.0",
20+
"ncc": "^0.3.6"
21+
}
22+
}

0 commit comments

Comments
 (0)