diff options
-rw-r--r-- | .github/workflows/dockerbuild.yml | 9 | ||||
-rw-r--r-- | .github/workflows/documentation.yml | 27 | ||||
-rw-r--r-- | .github/workflows/lint.yml | 1 | ||||
-rw-r--r-- | .github/workflows/prhtmlgenerator.yml | 126 | ||||
-rw-r--r-- | .github/workflows/tests.yml | 1 |
5 files changed, 1 insertions, 163 deletions
diff --git a/.github/workflows/dockerbuild.yml b/.github/workflows/dockerbuild.yml index 39645558..f65a72c2 100644 --- a/.github/workflows/dockerbuild.yml +++ b/.github/workflows/dockerbuild.yml @@ -8,8 +8,7 @@ on: - '20*' env: - DOCKERHUB_SLUG: rssbridge/rss-bridge - GHCR_SLUG: ghcr.io/rss-bridge/rss-bridge + GHCR_SLUG: ghcr.io/ansg191/rss-bridge jobs: bake: @@ -38,12 +37,6 @@ jobs: name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml deleted file mode 100644 index e0201022..00000000 --- a/.github/workflows/documentation.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Documentation - -on: - push: - paths: - - 'docs/**' - -jobs: - documentation: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.0 - - name: Install dependencies - run: composer global require daux/daux.io - - name: Generate documentation - run: daux generate - - name: Deploy same repository 🚀 - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: "static" - branch: gh-pages diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 206b53de..d589db66 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,7 +2,6 @@ name: Lint on: push: - branches: [ master ] pull_request: branches: [ master ] diff --git a/.github/workflows/prhtmlgenerator.yml b/.github/workflows/prhtmlgenerator.yml deleted file mode 100644 index 163d51e3..00000000 --- a/.github/workflows/prhtmlgenerator.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: 'PR Testing' - -on: - pull_request_target: - branches: [ master ] - -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: - name: Generate HTML - runs-on: ubuntu-latest - needs: check-bridges - if: needs.check-bridges.outputs.BRIDGES > 0 - env: - PYTHONUNBUFFERED: 1 - # Needs additional permissions https://github.com/actions/first-interaction/issues/10#issuecomment-1041402989 - steps: - - name: Check out self - uses: actions/checkout@v4 - with: - ref: ${{github.event.pull_request.head.ref}} - repository: ${{github.event.pull_request.head.repo.full_name}} - - name: Check out rss-bridge - run: | - PR=${{github.event.number}}; - wget -O requirements.txt https://raw.githubusercontent.com/$GITHUB_REPOSITORY/${{ github.event.pull_request.base.ref }}/.github/prtester-requirements.txt; - wget https://raw.githubusercontent.com/$GITHUB_REPOSITORY/${{ github.event.pull_request.base.ref }}/.github/prtester.py; - wget https://patch-diff.githubusercontent.com/raw/$GITHUB_REPOSITORY/pull/$PR.patch; - touch DEBUG; - 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 > whitelist.txt - - name: Start Docker - Current - run: | - docker run -d -v $GITHUB_WORKSPACE/whitelist.txt:/app/whitelist.txt -v $GITHUB_WORKSPACE/DEBUG:/app/DEBUG -p 3000:80 ghcr.io/rss-bridge/rss-bridge:latest - - name: Start Docker - PR - run: | - docker build -t prbuild .; - docker run -d -v $GITHUB_WORKSPACE/whitelist.txt:/app/whitelist.txt -v $GITHUB_WORKSPACE/DEBUG:/app/DEBUG -p 3001:80 prbuild - - name: Setup python - uses: actions/setup-python@v5 - with: - python-version: '3.13' - cache: 'pip' - - name: Install requirements - run: | - cd $GITHUB_WORKSPACE - pip install -r requirements.txt - - name: Run bridge tests - id: testrun - run: | - mkdir results; - python prtester.py; - body="$(cat comment.txt)"; - body="${body//'%'/'%25'}"; - body="${body//$'\n'/'%0A'}"; - body="${body//$'\r'/'%0D'}"; - echo "bodylength=${#body}" >> $GITHUB_OUTPUT - env: - PR: ${{ github.event.number }} - - name: Upload generated tests - uses: actions/upload-artifact@v4 - id: upload-generated-tests - with: - name: tests - path: '*.html' - - name: Find Comment - if: ${{ steps.testrun.outputs.bodylength > 130 }} - uses: peter-evans/find-comment@v3 - id: fc - with: - issue-number: ${{ github.event.pull_request.number }} - comment-author: 'github-actions[bot]' - body-includes: Pull request artifacts - - name: Create or update comment - if: ${{ steps.testrun.outputs.bodylength > 130 }} - uses: peter-evans/create-or-update-comment@v4 - with: - comment-id: ${{ steps.fc.outputs.comment-id }} - issue-number: ${{ github.event.pull_request.number }} - body-file: comment.txt - edit-mode: replace - upload_tests: - name: Upload tests - runs-on: ubuntu-latest - needs: test-pr - steps: - - uses: actions/checkout@v4 - with: - repository: 'RSS-Bridge/rss-bridge-tests' - ref: 'main' - token: ${{ secrets.RSSTESTER_ACTION }} - - - name: Setup git config - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "<>" - - - name: Download tests - uses: actions/download-artifact@v4 - with: - name: tests - - - name: Move tests - run: | - cd prs - mkdir -p ${{github.event.number}} - cd ${{github.event.number}} - mv -f $GITHUB_WORKSPACE/*.html . - - - name: Commit and push generated tests - run: | - export COMMIT_MESSAGE="Added tests for PR ${{github.event.number}}" - git add . - git commit -m "$COMMIT_MESSAGE" - git push diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 93f07b0f..7bad3fb2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,7 +2,6 @@ name: Tests on: push: - branches: [ master ] pull_request: branches: [ master ] |