File tree Expand file tree Collapse file tree 2 files changed +32
-4
lines changed Expand file tree Collapse file tree 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
22
33on :
44 pull_request :
1010 build :
1111 runs-on : ubuntu-latest
1212
13+ permissions :
14+ contents : read
15+ packages : write
16+
1317 steps :
1418 - uses : actions/checkout@v4
1519
2327 out=$(mktemp -d)
2428 docker run --volume "$out:/out" --rm ffdocs -o /out -v 1.0.*
2529 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 […]
8383
8484### Docker
8585
86- A Docker image can be built with the file [ ` docker/Dockerfile ` ] ( ./docker/Dockerfile ) .
86+ A Docker image is published to GitHub Packages:
8787
8888``` 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:
9093
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 .
92102```
93103
94104
You can’t perform that action at this time.
0 commit comments