Skip to content

Update Docker Hub Description #29

Update Docker Hub Description

Update Docker Hub Description #29

name: Update Docker Hub Description
on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- .github/.teamplate-README.md
- .github/workflows/dockerhub-description.yml
jobs:
update_description:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
mod:
- valve
- cstrike
- czero
- dod
- gearbox
- tfc
- ricochet
- dmc
include:
- mod: valve
logoUrl: "https://cdn.cloudflare.steamstatic.com/steam/apps/70/header.jpg"
- mod: cstrike
logoUrl: "https://cdn.cloudflare.steamstatic.com/steam/apps/10/header.jpg"
- mod: czero
logoUrl: "https://cdn.cloudflare.steamstatic.com/steam/apps/80/header.jpg"
- mod: dod
logoUrl: "https://cdn.cloudflare.steamstatic.com/steam/apps/30/header.jpg"
- mod: gearbox
logoUrl: "https://cdn.cloudflare.steamstatic.com/steam/apps/50/header.jpg"
- mod: tfc
logoUrl: "https://cdn.cloudflare.steamstatic.com/steam/apps/20/header.jpg"
- mod: ricochet
logoUrl: "https://cdn.cloudflare.steamstatic.com/steam/apps/60/header.jpg"
- mod: dmc
logoUrl: "https://cdn.cloudflare.steamstatic.com/steam/apps/40/header.jpg"
env:
TEAMPLATE_PATH: .github/.teamplate-README.md
steps:
- uses: actions/checkout@v4.1.1
- name: Modify readme for DockerHub
run: |
template=$(cat ${{ env.TEAMPLATE_PATH }})
template="${template//\$dockerUser/${{ vars.DOCKER_USERNAME }}}"
template="${template//\$dockerRepo/${{ matrix.mod }}}"
template="${template//\$githubRepository/${{ github.repository }}}"
template="${template//\$logoUrl/${{ matrix.logoUrl }}}"
template="${template//\$mod/${{ matrix.mod }}}"
echo "$template" > ${{ env.TEAMPLATE_PATH }}
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{ vars.DOCKER_USERNAME }}/${{ matrix.mod }}
short-description: ${{ github.event.repository.description }} (${{ matrix.mod }})
readme-filepath: ${{ env.TEAMPLATE_PATH }}