Skip to content

Commit 7db1782

Browse files
committed
Update README.md
1 parent fc64b6e commit 7db1782

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

README.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,45 @@
1-
# run-containerized-script
1+
[![GitHub release](https://img.shields.io/github/release/RedisLabsModules/run-containerized-script.svg?style=flat-square)](https://github.com/RedisLabsModules/run-containerized-script/releases/latest)
2+
3+
## About
4+
25
A reusable GitHub Action that executes a bash script inside a container with the current working directory (CWD) mounted. This action simplifies workflows by enabling script execution in an isolated containerized environment while maintaining access to the local project files
6+
7+
This allows running [`actions/checkout`](https://github.com/actions/checkout), [`actions/download-artifact`](https://github.com/actions/download-artifact), [`actions/upload-artifact`](https://github.com/actions/upload-artifact), and other actions outside of the container's context.
8+
9+
___
10+
11+
* [Usage](#usage)
12+
* [inputs](#inputs)
13+
14+
## Usage
15+
16+
```yaml
17+
steps:
18+
- name: Checkout Foo repository
19+
uses: actions/checkout@v4
20+
- name: Build inside of container
21+
uses: RedisLabsModules/run-containerized-script@v1
22+
with:
23+
image: docker.io/foo/foo-container:x.y.z
24+
args: |
25+
echo "::group::Building Foo"
26+
cd foo-folder
27+
make
28+
echo "::endgroup::"
29+
tar -czf foo-artifacts.tar.gz
30+
- name: Upload Foo artifact
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: foo-artifacts
34+
path: |
35+
foo-folder/foo-artifacts.tar.gz
36+
```
37+
38+
## inputs
39+
40+
The following inputs can be used as `step.with` keys:
41+
42+
| Name | Type | Description |
43+
|--------------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
44+
| `image` | String | The container image to use. |
45+
| `args` | String | The script to invoke inside of the container. |

0 commit comments

Comments
 (0)