From ed769af99b4f43d1dd7871da00c4164f5bee1933 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Wed, 26 May 2021 15:28:57 +0300 Subject: [PATCH] Update auto-update.yml --- .github/workflows/auto-update.yml | 46 ++++++------------------------- 1 file changed, 9 insertions(+), 37 deletions(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 0a0ad01dfd..73681d3a99 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -4,49 +4,33 @@ on: schedule: - cron: '0 0 * * *' jobs: - remove-duplicates: + update: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 + - name: Update Config + run: | + git config user.name github-actions + git config user.email github-actions@github.com + - name: Create Branch + run: | + git fetch --prune --unshallow + git checkout bot/auto-update || git checkout -b bot/auto-update - name: Install Dependencies run: npm install - name: Remove Duplicates run: node scripts/remove-duplicates.js - name: Commit Changes run: | - git config user.name github-actions - git config user.email github-actions@github.com git add channels/* git diff-index --quiet HEAD || git commit -m "[Bot] Remove duplicates" - git pull - git push - format: - runs-on: ubuntu-latest - needs: remove-duplicates - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install Dependencies - run: npm install - name: Format Playlists run: node scripts/format.js - name: Commit Changes run: | - git config user.name github-actions - git config user.email github-actions@github.com git add channels/* git diff-index --quiet HEAD || git commit -m "[Bot] Format playlists" - git pull - git push - generate: - runs-on: ubuntu-latest - needs: format - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install Dependencies - run: npm install - name: Generate Playlists run: node scripts/generate.js - name: Deploy to GitHub Pages @@ -54,21 +38,9 @@ jobs: with: branch: gh-pages folder: .gh-pages - update-readme: - runs-on: ubuntu-latest - needs: generate - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install Dependencies - run: npm install - name: Update README.md run: node scripts/update-readme.js - name: Commit Changes run: | - git config user.name github-actions - git config user.email github-actions@github.com git add README.md git diff-index --quiet HEAD || git commit -m "[Bot] Update README.md" - git pull - git push