From 7722d0c86c891c7e49f06eae4617d9faee3defc0 Mon Sep 17 00:00:00 2001 From: Stavros Date: Sun, 21 Jan 2024 19:07:40 +0200 Subject: [PATCH] refactor(readme-generator): use better names (#2261) --- .github/workflows/app-list-generator.yml | 25 ---------------- .github/workflows/readme-generator.yml | 30 ++++++++++++++++++++ app-list-generator.ts => readme-generator.ts | 10 +++---- 3 files changed, 35 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/app-list-generator.yml create mode 100644 .github/workflows/readme-generator.yml rename app-list-generator.ts => readme-generator.ts (98%) diff --git a/.github/workflows/app-list-generator.yml b/.github/workflows/app-list-generator.yml deleted file mode 100644 index 056a2f94..00000000 --- a/.github/workflows/app-list-generator.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: app-list-generator - -on: - push: - branches: - - "master" - -jobs: - generate-readme-file: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Bun - uses: oven-sh/setup-bun@v1 - - - name: Delete old readme (just in case) - run: rm README.md - - - name: Generate new README.md file - run: bun app-list-generator.ts - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 diff --git a/.github/workflows/readme-generator.yml b/.github/workflows/readme-generator.yml new file mode 100644 index 00000000..7670d988 --- /dev/null +++ b/.github/workflows/readme-generator.yml @@ -0,0 +1,30 @@ +name: Readme Generator + +on: + workflow-dispatch: + +jobs: + generate-readme-file: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Bun + uses: oven-sh/setup-bun@v1 + + - name: Generate new README.md file + run: bun reamde-generator.ts + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: | + docs: regenerate readme app list + committer: GitHub + author: GitHub + branch: bot/readme-update + title: | + readme-generator: update readme + labels: bot diff --git a/app-list-generator.ts b/readme-generator.ts similarity index 98% rename from app-list-generator.ts rename to readme-generator.ts index 3146a8c2..2ca46e37 100644 --- a/app-list-generator.ts +++ b/readme-generator.ts @@ -45,15 +45,15 @@ const writeToReadme = async (appsList) => { let finalReadme = `# Tipi App Store ⛺️ This is the official repository for the Tipi App Store. It contains all the apps that are available for download on [Tipi](https://github.com/meienberger/runtipi). - + ## Apps available - + ${appsList} - + ## How to sumbit an app - + If you want to see new apps on Tipi you can either: - + - [Open an issue](https://github.com/meienberger/runtipi-appstore/issues) on this repository and members of the community will add it - [Join the Discord](https://discord.gg/Bu9qEPnHsc) members of the community will add it. - Fork this repo and create the necessary files for a Tipi app. Follow this [guide](<[https://github.com/meienberger/runtipi/wiki/Adding-your-own-app](https://www.runtipi.io/docs/contributing/adding-a-new-app)>)`;