Skip to content

Commit

Permalink
Add automatic update container description action
Browse files Browse the repository at this point in the history
  • Loading branch information
prodrigestivill committed Dec 27, 2023
1 parent 187e2e2 commit 1585873
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ on:
- 'main'
paths-ignore:
- '**.md'
- '.gitignore'
- '.github/workflows/readme.yml'
pull_request:
paths-ignore:
- '**.md'
- '.github/**'

jobs:
test-script:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: README

on:
push:
branches:
- 'main'
paths:
- 'README.md'
- 'dockerhub-header.md'
- '.github/workflows/readme.yml'

jobs:
push-readme:
runs-on: ubuntu-22.04
environment: docker.io
steps:
- uses: actions/checkout@v3

- name: Generate README for DockerHub
run: cp dockerhub-header.md dockerhub.md && awk '{if(p)print}/^# /{p=1}' README.md >> dockerhub.md

- name: Push README to DockerHub
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }}
with:
destination_container_repo: ${{ secrets.DOCKERHUB_USERNAME }}/postgres-backup-local
provider: dockerhub
short_description: 'Backup PostgresSQL to local filesystem with periodic backups and rotate backups.'
readme_file: 'dockerhub.md'
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.data
.data
dockerhub.md
6 changes: 6 additions & 0 deletions dockerhub-header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[![GitHub code](https://img.shields.io/static/v1?label=Source%20code&message=%20&style=social&logo=github)](https://github.com/prodrigestivill/docker-postgres-backup-local)
![GitHub stars](https://img.shields.io/github/stars/prodrigestivill/docker-postgres-backup-local?style=social)
![GitHub issues](https://img.shields.io/github/issues-raw/prodrigestivill/docker-postgres-backup-local?logo=github&style=social)
[![GitHub actions](https://github.com/prodrigestivill/docker-postgres-backup-local/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/prodrigestivill/docker-postgres-backup-local/actions)

# prodrigestivill/postgres-backup-local

0 comments on commit 1585873

Please sign in to comment.