mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-16 15:19:55 +03:00
[prtester] Optimize tester workflow (#4303)
This commit is contained in:
parent
70cf917f09
commit
664436c5f4
1 changed files with 15 additions and 0 deletions
15
.github/workflows/prhtmlgenerator.yml
vendored
15
.github/workflows/prhtmlgenerator.yml
vendored
|
@ -5,9 +5,24 @@ on:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-bridges:
|
||||||
|
name: Check if bridges were changed
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
BRIDGES: ${{ steps.check1.outputs.BRIDGES }}
|
||||||
|
steps:
|
||||||
|
- name: Check number of bridges
|
||||||
|
id: check1
|
||||||
|
run: |
|
||||||
|
PR=${{github.event.number}};
|
||||||
|
wget https://patch-diff.githubusercontent.com/raw/$GITHUB_REPOSITORY/pull/$PR.patch;
|
||||||
|
bridgeamount=$(cat $PR.patch | grep "\bbridges/[A-Za-z0-9]*Bridge\.php\b" | sed "s=.*\bbridges/\([A-Za-z0-9]*\)Bridge\.php\b.*=\1=g" | sort | uniq | wc -l);
|
||||||
|
echo "BRIDGES=$bridgeamount" >> "$GITHUB_OUTPUT"
|
||||||
test-pr:
|
test-pr:
|
||||||
name: Generate HTML
|
name: Generate HTML
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: check-bridges
|
||||||
|
if: needs.check-bridges.outputs.BRIDGES > 0
|
||||||
env:
|
env:
|
||||||
PYTHONUNBUFFERED: 1
|
PYTHONUNBUFFERED: 1
|
||||||
# Needs additional permissions https://github.com/actions/first-interaction/issues/10#issuecomment-1041402989
|
# Needs additional permissions https://github.com/actions/first-interaction/issues/10#issuecomment-1041402989
|
||||||
|
|
Loading…
Add table
Reference in a new issue