You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+40-2
Original file line number
Diff line number
Diff line change
@@ -28,19 +28,57 @@ jobs:
28
28
| `action-ref` | Reference to the nested action (e.g., owner/repo@ref) | Yes |
29
29
| `extra-args` | Extra arguments to pass to the nested action | No |
30
30
31
+
## Features
32
+
33
+
- **Flexible Reference Handling**: Supports both tags (e.g., `v1.0.0`) and branch names (e.g., `main`)
34
+
- **Smart Extraction**: Intelligently finds the extracted directory even if naming patterns change
35
+
- **Format Flexibility**: Supports both `action.yml` and `action.yaml` metadata files
36
+
- **Robust Error Handling**: Attempts alternative download URLs if the first one fails
37
+
- **Dependency Management**: Automatically installs dependencies for the wrapped action
38
+
31
39
## How It Works
32
40
33
41
1. **Parsing the Input:**
34
42
The wrapper reads an input `action-ref` (like `"owner/repo@ref"`) and splits it into the repository identifier and ref.
35
43
36
44
2. **Downloading the Repository:**
37
-
It constructs the URL for the GitHub zip archive and downloads it using Axios. The zip is then extracted using the `unzipper` package into a temporary directory.
45
+
It constructs the URL for the GitHub zip archive, automatically handling both branch and tag references. The zip is then downloaded using Axios and extracted using the `unzipper` package into a temporary directory.
38
46
39
47
3. **Reading Action Metadata:**
40
-
The script reads the `action.yml` file from the extracted folder to determine the JavaScript entry point (from the `runs.main` field).
48
+
The script reads the action's metadata file (either `action.yml` or `action.yaml`) from the extracted folder to determine the JavaScript entry point (from the `runs.main` field).
41
49
42
50
4. **Dependency Installation (Optional):**
43
51
If a `package.json` is present in the nested action, it runs `npm install` to install dependencies.
44
52
45
53
5. **Executing the Nested Action:**
46
54
Finally, the wrapper runs the nested action's entry file using Node.js. Any extra arguments provided via the `extra-args` input are passed along.
0 commit comments