Skip to content

Commit 1bf3b92

Browse files
committed
fix(app/action): add --rm to auto-clean docker images
1 parent 5e3460f commit 1bf3b92

File tree

7 files changed

+305
-305
lines changed

7 files changed

+305
-305
lines changed

.github/readme/partials/documentation/setup/docker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A machine with a recent version of [docker](https://www.docker.com/) is required
88

99
The command to use is similar to the following:
1010
```shell
11-
docker run --env INPUT_TOKEN=**** --env INPUT_USER=user --volume=/tmp:/renders ghcr.io/lowlighter/metrics:latest
11+
docker run --rm --env INPUT_TOKEN=**** --env INPUT_USER=user --volume=/tmp:/renders ghcr.io/lowlighter/metrics:latest
1212
```
1313

1414
To pass parameters, pass environment variable with the same name as the corresponding action option but in uppercase and prefixed with `INPUT_`.

.github/readme/partials/documentation/setup/web.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ PUBLISHED_PORT=80
104104

105105
And start the container using the following command:
106106
```shell
107-
docker run --entrypoint="" -p=127.0.0.1:$PUBLISHED_PORT:$SERVICE_PORT --volume=$SETTINGS:/metrics/settings.json ghcr.io/lowlighter/metrics:$VERSION npm start
107+
docker run --rm --entrypoint="" -p=127.0.0.1:$PUBLISHED_PORT:$SERVICE_PORT --volume=$SETTINGS:/metrics/settings.json ghcr.io/lowlighter/metrics:$VERSION npm start
108108
```
109109

110110
## 4️ Add images to your profile `README.md`

.github/scripts/files/examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: Screenshot markdown example
4545
if: ${{ success() || failure() }}
4646
run: |
47-
docker run --entrypoint="" --volume=/tmp:/tmp ghcr.io/lowlighter/metrics:master node /metrics/.github/scripts/markdown_example.mjs
47+
docker run --rm --entrypoint="" --volume=/tmp:/tmp ghcr.io/lowlighter/metrics:master node /metrics/.github/scripts/markdown_example.mjs
4848
sudo mv /tmp/metrics.markdown.png /metrics_renders/
4949
- name: Publish examples
5050
if: ${{ success() || failure() }}

.github/workflows/examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,12 +1197,12 @@ jobs:
11971197
user: lowlighter
11981198
plugins_errors_fatal: yes
11991199
if: ${{ success() || failure() }}
1200-
1200+
12011201

12021202
- name: Screenshot markdown example
12031203
if: ${{ success() || failure() }}
12041204
run: |
1205-
docker run --entrypoint="" --volume=/tmp:/tmp ghcr.io/lowlighter/metrics:master node /metrics/.github/scripts/markdown_example.mjs
1205+
docker run --rm --entrypoint="" --volume=/tmp:/tmp ghcr.io/lowlighter/metrics:master node /metrics/.github/scripts/markdown_example.mjs
12061206
sudo mv /tmp/metrics.markdown.png /metrics_renders/
12071207
- name: Publish examples
12081208
if: ${{ success() || failure() }}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Build lowlighter/metrics:${{ github.head_ref || 'master' }}
4747
run: docker build -t lowlighter/metrics:$(echo ${{ github.head_ref || 'master' }} | sed 's/\//-/g') .
4848
- name: Run tests
49-
run: docker run --entrypoint="" lowlighter/metrics:$(echo ${{ github.head_ref || 'master' }} | sed 's/\//-/g') npm run test-metrics
49+
run: docker run --rm --entrypoint="" lowlighter/metrics:$(echo ${{ github.head_ref || 'master' }} | sed 's/\//-/g') npm run test-metrics
5050

5151
# Run CodeQL on branch
5252
analyze:

0 commit comments

Comments
 (0)