-
Notifications
You must be signed in to change notification settings - Fork 88
56 lines (54 loc) · 1.72 KB
/
image-docs-publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: "Update Image Description at Dockerhub"
on:
push:
branches:
- main
paths:
- .github/workflows/image-docs-publish.yaml
- docker/**/README.md
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
apps: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
klipper:
- .github/workflows/image-docs-publish.yaml
- docker/klipper/README.md
klipperscreen:
- .github/workflows/image-docs-publish.yaml
- docker/klipperscreen/README.md
moonraker:
- .github/workflows/image-docs-publish.yaml
- docker/moonraker/README.md
ustreamer:
- .github/workflows/image-docs-publish.yaml
- docker/moonraker/README.md
dockerhub-description:
needs: changes
if: ${{ needs.changes.outputs.apps != '' && toJson(fromJson(needs.changes.outputs.apps)) != '[]' }}
strategy:
matrix:
app: ${{ fromJSON(needs.changes.outputs.apps) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Update Docker Hub Description"
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.app }}
readme-filepath: ./docker/${{ matrix.app }}/README.md
enable-url-completion: true