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
+30-6Lines changed: 30 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,30 @@
1
1
# Action Tools
2
2
3
3
## Actions
4
+
5
+
### Collect Env
6
+
7
+
This GitHub Action allows you to collect environment variables with a specific prefix and write them to a file. It is useful when you want to extract environment variables that match a certain pattern and save them to a `.env` file for deployment or configuration purposes.
8
+
9
+
#### Usage
10
+
11
+
```yaml
12
+
- name: Collect environment variables
13
+
uses: ./action-tools/collect-env
14
+
with:
15
+
prefix: 'API_'
16
+
output: '.env.api'
17
+
remove-prefix: true
18
+
```
19
+
20
+
#### Inputs
21
+
22
+
| Name | Description | Required | Default |
23
+
|------|-------------|----------|---------|
24
+
| prefix | The prefix to filter environment variables by | true | - |
25
+
| output | The output file to write the collected variables to | true | - |
26
+
| remove-prefix | Whether to remove the prefix from variable names in the output | false | false |
27
+
4
28
### Overwrite Env File
5
29
6
30
This GitHub Action allows you to overwrite the contents of an environment file with the contents of another file. It is useful when you want to promote/stage environment variables from one environment to another (for example, from a `.env.development` file to a `.env.production` file) automatically in your workflows.
@@ -11,16 +35,16 @@ This GitHub Action allows you to overwrite the contents of an environment file w
11
35
- name: Overwrite production env file with development env file
This GitHub Action allows you to collect environment variables with a specific prefix and write them to a file. It is useful when you want to extract environment variables that match a certain pattern and save them to a `.env` file for deployment or configuration purposes.
4
+
5
+
#### Usage
6
+
7
+
```yaml
8
+
- name: Collect environment variables
9
+
uses: ./action-tools/collect-env
10
+
with:
11
+
prefix: 'API_'
12
+
output: '.env.api'
13
+
remove-prefix: true
14
+
```
15
+
16
+
#### Inputs
17
+
18
+
| Name | Description | Required | Default |
19
+
|------|-------------|----------|---------|
20
+
| prefix | The prefix to filter environment variables by | true | - |
21
+
| output | The output file to write the collected variables to | true | - |
22
+
| remove-prefix | Whether to remove the prefix from variable names in the output | false | false |
This GitHub Action allows you to overwrite the contents of an environment file with the contents of another file. It is useful when you want to promote/stage environment variables from one environment to another (for example, from a `.env.development` file to a `.env.production` file) automatically in your workflows.
4
+
5
+
#### Usage
6
+
7
+
```yaml
8
+
- name: Overwrite production env file with development env file
0 commit comments