Skip to content

Commit

Permalink
Create special readme for Dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
Netfloex committed Dec 28, 2021
1 parent 86a4e77 commit 7228a6e
Show file tree
Hide file tree
Showing 5 changed files with 532 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/dockerhub-description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Create Docker Hub Readme
run: ./concatReadme.sh

- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v2
with:
username: netfloex
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: netfloex/nginx
short-description: ${{ github.event.repository.description }}
readme-filepath: ./tmp.md
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,15 @@ services:
You can create a config file using json5, js or yaml.
The file should be placed in the config folder as `config.(yml|yaml|json|jsonc|json5|js)`

[Example javascript config](config/config.example.js)
[Example json config](config/config.example.jsonc)
[Example yaml config](config/config.example.yml)
<a href="config/config.example.js">
<img src="https://img.shields.io/badge/Example-javascript-yellow" alt="javascript">
</a>
<a href="config/config.example.jsonc">
<img src="https://img.shields.io/badge/Example-JSON-green" alt="json">
</a>
<a href="config/config.example.yml">
<img src="https://img.shields.io/badge/Example-YAML-red" alt="yaml">
</a>

## Server Options

Expand Down
11 changes: 11 additions & 0 deletions concatReadme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cat dockerhub.md > tmp.md
echo -e "\n" >> tmp.md
cat README.md >> tmp.md
export URL="https:\/\/github.com\/Netfloex\/Nginx"

sed -i "s/](#/]($URL#/" tmp.md
sed -i "s/](src/]($URL\/blob\/master\/src/" tmp.md
sed -i "s/](config/]($URL\/blob\/master\/config/" tmp.md
sed -i "s/](docker/]($URL\/blob\/master\/docker/" tmp.md
sed -i "s/href=\"config/href=\"$URL\/blob\/master\/config/" tmp.md

4 changes: 4 additions & 0 deletions dockerhub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<a href="https://github.com/Netfloex/Nginx" >
<img src="https://img.shields.io/github/workflow/status/Netfloex/Nginx/docker-build?label=Github&logo=Github" alt="">
<img src="https://img.shields.io/github/commit-activity/m/Netfloex/Nginx?label=Commits&logo=github" alt="">
</a>
Loading

0 comments on commit 7228a6e

Please sign in to comment.