File tree Expand file tree Collapse file tree 2 files changed +55
-3
lines changed Expand file tree Collapse file tree 2 files changed +55
-3
lines changed Original file line number Diff line number Diff line change 77 - master
88 tags :
99 - ' v*.*.*'
10+ paths-ignore :
11+ - ' **.md'
12+ - ' docs/**'
13+ - ' .github/**'
14+ - ' !.github/workflows/docker-publish.yml'
1015 pull_request :
1116 branches :
1217 - main
1722 description : ' Docker image tag'
1823 required : false
1924 default : ' latest'
25+ update_readme :
26+ description : ' Update Docker Hub README'
27+ required : false
28+ type : boolean
29+ default : true
2030
2131env :
2232 DOCKERHUB_IMAGE : ${{ secrets.DOCKERHUB_USERNAME }}/snapdocs
@@ -68,12 +78,23 @@ jobs:
6878 cache-from : type=gha
6979 cache-to : type=gha,mode=max
7080
81+ update-docker-hub-description :
82+ name : Update Docker Hub Description
83+ runs-on : ubuntu-latest
84+ needs : build-and-push
85+ if : |
86+ github.event_name != 'pull_request' &&
87+ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || github.event.inputs.update_readme == 'true')
88+
89+ steps :
90+ - name : Checkout repository
91+ uses : actions/checkout@v4
92+
7193 - name : Update Docker Hub Description
72- if : github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
7394 uses : peter-evans/dockerhub-description@v4
7495 with :
7596 username : ${{ secrets.DOCKERHUB_USERNAME }}
7697 password : ${{ secrets.DOCKERHUB_TOKEN }}
77- repository : ${{ secrets.DOCKERHUB_USERNAME }}/snapdocs
98+ repository : ${{ env.DOCKERHUB_IMAGE }}
7899 readme-filepath : ./README.md
79- short-description : ' SnapDocs - Open source collaborative document workspace'
100+ short-description : ' SnapDocs - Open source, self-hostable document workspace with real-time collaboration '
Original file line number Diff line number Diff line change 1+ name : Update Docker Hub README
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - master
8+ paths :
9+ - ' README.md'
10+ workflow_dispatch :
11+
12+ env :
13+ DOCKERHUB_IMAGE : ${{ secrets.DOCKERHUB_USERNAME }}/snapdocs
14+
15+ jobs :
16+ update-readme :
17+ name : Update Docker Hub README
18+ runs-on : ubuntu-latest
19+
20+ steps :
21+ - name : Checkout repository
22+ uses : actions/checkout@v4
23+
24+ - name : Update Docker Hub Description
25+ uses : peter-evans/dockerhub-description@v4
26+ with :
27+ username : ${{ secrets.DOCKERHUB_USERNAME }}
28+ password : ${{ secrets.DOCKERHUB_TOKEN }}
29+ repository : ${{ env.DOCKERHUB_IMAGE }}
30+ readme-filepath : ./README.md
31+ short-description : ' SnapDocs - Open source, self-hostable document workspace with real-time collaboration'
You can’t perform that action at this time.
0 commit comments