Skip to content

Commit 7f1ef7c

Browse files
committed
Add workflow to push README to Docker Hub
1 parent a4656a8 commit 7f1ef7c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Update Docker Hub Description
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths:
7+
- README.md
8+
- .github/workflows/dockerhub-description.yml
9+
jobs:
10+
dockerHubDescription:
11+
runs-on: ubuntu-20.04
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Modify readme for DockerHub
16+
run: |
17+
sed -i '1,2d' README.md
18+
sed -i 's/(LICENSE)/(https:\/\/github.com\/nginxinc\/nginx-prometheus-exporter\/blob\/master\/LICENSE)/' README.md
19+
20+
- name: Docker Hub Description
21+
uses: peter-evans/dockerhub-description@v2
22+
with:
23+
username: ${{ secrets.DOCKERHUB_USERNAME }}
24+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
25+
repository: nginx/nginx-prometheus-exporter
26+
short-description: ${{ github.event.repository.description }}

0 commit comments

Comments
 (0)