File tree 2 files changed +32
-4
lines changed
2 files changed +32
-4
lines changed Original file line number Diff line number Diff line change 1
- name : Test Docker Image
1
+ name : Container Image
2
2
3
3
on :
4
4
pull_request :
10
10
build :
11
11
runs-on : ubuntu-latest
12
12
13
+ permissions :
14
+ contents : read
15
+ packages : write
16
+
13
17
steps :
14
18
- uses : actions/checkout@v4
15
19
23
27
out=$(mktemp -d)
24
28
docker run --volume "$out:/out" --rm ffdocs -o /out -v 1.0.*
25
29
test "$(find "$out" -name '*.html' | wc -l)" -ge 2
30
+
31
+ - name : Push Image
32
+ if : github.ref_name == 'main'
33
+ run : |
34
+ set -e
35
+
36
+ echo "${{ secrets.GITHUB_TOKEN }}" \
37
+ | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
38
+
39
+ IMAGE_ID=ghcr.io/${{ github.repository }}:latest
40
+
41
+ set -x
42
+ docker tag ffdocs "$IMAGE_ID"
43
+ docker push "$IMAGE_ID"
Original file line number Diff line number Diff line change @@ -83,12 +83,22 @@ $ nix develop --command ./ffmpeg-filters-docs […]
83
83
84
84
### Docker
85
85
86
- A Docker image can be built with the file [ ` docker/Dockerfile ` ] ( ./docker/Dockerfile ) .
86
+ A Docker image is published to GitHub Packages:
87
87
88
88
``` console
89
- $ docker build --tag ffdocs --file docker/Dockerfile .
89
+ $ docker run --rm -v /tmp/ffdocs:/out ghcr.io/ayosec/ffmpeg-filters-docs --output /out
90
+ ```
91
+
92
+ To run a local checkout of the repository (for example, to test changes in the implementation), replace the ` /app ` directory:
90
93
91
- $ docker run --volume /tmp/web:/tmp/web ffdocs --versions 7.1 --output /tmp/web
94
+ ``` console
95
+ $ docker run --rm -v /tmp/ffdocs:/out -v " $PWD :/app" ghcr.io/ayosec/ffmpeg-filters-docs --output /out
96
+ ```
97
+
98
+ The image can be built locally with the file [ ` docker/Dockerfile ` ] ( ./docker/Dockerfile ) :
99
+
100
+ ``` console
101
+ $ docker build --tag ffmpeg-filters-docs --file docker/Dockerfile .
92
102
```
93
103
94
104
You can’t perform that action at this time.
0 commit comments