From b6592bf9f7a25fb092a309ffbb99c7719414cea1 Mon Sep 17 00:00:00 2001 From: Ryan Algar Date: Mon, 13 Nov 2023 14:58:48 -0800 Subject: [PATCH] test(ci): temporarily change CI for local repo --- .github/workflows/ci.yml | 88 -------------------------- .github/workflows/codeql.yml | 41 ------------ .github/workflows/cypress.yml | 30 --------- .github/workflows/preview.yml | 27 ++++---- .github/workflows/release.yml | 116 ---------------------------------- .github/workflows/snap.yaml | 91 -------------------------- .github/workflows/support.yml | 25 -------- 7 files changed, 15 insertions(+), 403 deletions(-) delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/cypress.yml delete mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/snap.yaml delete mode 100644 .github/workflows/support.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 0d117c4ec..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: Jellyseerr CI - -on: - pull_request: - branches: - - '*' - push: - branches: - - develop - -jobs: - test: - name: Lint & Test Build - if: github.event_name == 'pull_request' - runs-on: ubuntu-20.04 - container: node:16.17-alpine - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install dependencies - env: - HUSKY: 0 - run: yarn - - name: Lint - run: yarn lint - - name: Formatting - run: yarn format:check - - name: Build - run: yarn build - - build_and_push: - name: Build & Publish Docker Images - if: github.ref == 'refs/heads/develop' && !contains(github.event.head_commit.message, '[skip ci]') - runs-on: ubuntu-20.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Log in to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} - - name: Log in to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v3 - with: - context: . - file: ./Dockerfile - platforms: linux/amd64,linux/arm64,linux/arm/v7 - push: true - build-args: | - COMMIT_TAG=${{ github.sha }} - tags: | - fallenbagel/jellyseerr:develop - - discord: - name: Send Discord Notification - needs: build_and_push - if: always() && github.event_name != 'pull_request' && !contains(github.event.head_commit.message, '[skip ci]') - runs-on: ubuntu-20.04 - steps: - - name: Get Build Job Status - uses: technote-space/workflow-conclusion-action@v3 - - name: Combine Job Status - id: status - run: | - failures=(neutral, skipped, timed_out, action_required) - if [[ ${array[@]} =~ $WORKFLOW_CONCLUSION ]]; then - echo "status=failure" >> $GITHUB_OUTPUT - else - echo "status=$WORKFLOW_CONCLUSION" >> $GITHUB_OUTPUT - fi - - name: Post Status to Discord - uses: sarisia/actions-status-discord@v1 - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - status: ${{ steps.status.outputs.status }} - title: ${{ github.workflow }} - nofail: true diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 10926bbd9..000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: 'CodeQL' - -on: - push: - branches: ['develop'] - pull_request: - branches: ['develop'] - schedule: - - cron: '50 7 * * 5' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [javascript] - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - queries: +security-and-quality - - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - with: - category: '/language:${{ matrix.language }}' diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml deleted file mode 100644 index ecd260dd5..000000000 --- a/.github/workflows/cypress.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Cypress Tests - -on: - pull_request: - branches: - - '*' - push: - branches: - - develop - -jobs: - cypress-run: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Cypress run - uses: cypress-io/github-action@v4 - with: - build: yarn cypress:build - start: yarn start - wait-on: 'http://localhost:5055' - record: true - env: - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - WITH_MIGRATIONS: true - # Fix test titles in cypress dashboard - COMMIT_INFO_MESSAGE: ${{github.event.pull_request.title}} - COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}} diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 3797936af..2d1a29cf4 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -1,29 +1,32 @@ -name: Jellyseerr Preview +name: Jellyseerr PostgreSQL Preview on: push: - tags: - - 'preview-*' + branches: + - 'v1.7.0/postgresql' jobs: + build_and_push: - name: Build & Publish Docker Preview Images - runs-on: ubuntu-20.04 + name: Build & Publish Docker Image + runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v3 - - name: Get the version - id: get_version - run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + - name: Set up QEMU uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Log in to Docker Hub + + - name: Log in to GitHub Container Registry uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push uses: docker/build-push-action@v3 with: @@ -34,4 +37,4 @@ jobs: build-args: | COMMIT_TAG=${{ github.sha }} tags: | - fallenbagel/jellyseerr:${{ steps.get_version.outputs.VERSION }} + ghcr.io/${{ github.repository_owner }}/jellyseerr-pgsql:v1.7.0-preview diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 94ba679b8..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,116 +0,0 @@ -name: Jellyseer Release - -on: workflow_dispatch - -jobs: - semantic-release: - name: Tag and release latest version - runs-on: ubuntu-20.04 - env: - HUSKY: 0 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 16 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Log in to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} - - name: Install dependencies - run: yarn - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - run: npx semantic-release - - build-snap: - name: Build Snap Package (${{ matrix.architecture }}) - needs: semantic-release - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - architecture: - - amd64 - - arm64 - - armhf - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Switch to main branch - run: git checkout main - - name: Pull latest changes - run: git pull - - name: Prepare - id: prepare - run: | - git fetch --prune --tags - if [[ $GITHUB_REF == refs/tags/* || $GITHUB_REF == refs/heads/master ]]; then - echo "RELEASE=stable" >> $GITHUB_OUTPUT - else - echo "RELEASE=edge" >> $GITHUB_OUTPUT - fi - - name: Set Up QEMU - uses: docker/setup-qemu-action@v1 - with: - image: tonistiigi/binfmt@sha256:df15403e06a03c2f461c1f7938b171fda34a5849eb63a70e2a2109ed5a778bde - - name: Build Snap Package - uses: diddlesnaps/snapcraft-multiarch-action@v1 - id: build - with: - architecture: ${{ matrix.architecture }} - - name: Upload Snap Package - uses: actions/upload-artifact@v2 - with: - name: jellyseerr-snap-package-${{ matrix.architecture }} - path: ${{ steps.build.outputs.snap }} - - name: Review Snap Package - uses: diddlesnaps/snapcraft-review-tools-action@v1 - with: - snap: ${{ steps.build.outputs.snap }} - - name: Publish Snap Package - uses: snapcore/action-publish@v1 - env: - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_LOGIN }} - with: - snap: ${{ steps.build.outputs.snap }} - release: ${{ steps.prepare.outputs.RELEASE }} - - discord: - name: Send Discord Notification - needs: semantic-release - if: always() - runs-on: ubuntu-20.04 - steps: - - name: Get Build Job Status - uses: technote-space/workflow-conclusion-action@v3 - - name: Combine Job Status - id: status - run: | - failures=(neutral, skipped, timed_out, action_required) - if [[ ${array[@]} =~ $WORKFLOW_CONCLUSION ]]; then - echo "status=failure" >> $GITHUB_OUTPUT - else - echo "status=$WORKFLOW_CONCLUSION" >> $GITHUB_OUTPUT - fi - - name: Post Status to Discord - uses: sarisia/actions-status-discord@v1 - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - status: ${{ steps.status.outputs.status }} - title: ${{ github.workflow }} - nofail: true diff --git a/.github/workflows/snap.yaml b/.github/workflows/snap.yaml deleted file mode 100644 index 9c5b143b1..000000000 --- a/.github/workflows/snap.yaml +++ /dev/null @@ -1,91 +0,0 @@ -name: Publish Snap - -on: - push: - branches: - - develop - -jobs: - jobs: - name: Job Check - runs-on: ubuntu-20.04 - if: "!contains(github.event.head_commit.message, '[skip ci]')" - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.10.0 - with: - access_token: ${{ secrets.GITHUB_TOKEN }} - - build-snap: - name: Build Snap Package (${{ matrix.architecture }}) - needs: jobs - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - architecture: - - amd64 - - arm64 - - armhf - steps: - - name: Checkout Code - uses: actions/checkout@v3 - - name: Prepare - id: prepare - run: | - git fetch --prune --unshallow --tags - if [[ $GITHUB_REF == refs/tags/* || $GITHUB_REF == refs/heads/master ]]; then - echo "RELEASE=stable" >> $GITHUB_OUTPUT - else - echo "RELEASE=edge" >> $GITHUB_OUTPUT - fi - - name: Set Up QEMU - uses: docker/setup-qemu-action@v2 - - name: Configure Git - run: git config --add safe.directory /data/parts/jellyseerr/src - - name: Build Snap Package - uses: diddlesnaps/snapcraft-multiarch-action@v1 - id: build - with: - architecture: ${{ matrix.architecture }} - - name: Upload Snap Package - uses: actions/upload-artifact@v3 - with: - name: jellyseerr-snap-package-${{ matrix.architecture }} - path: ${{ steps.build.outputs.snap }} - - name: Review Snap Package - uses: diddlesnaps/snapcraft-review-tools-action@v1 - with: - snap: ${{ steps.build.outputs.snap }} - - name: Publish Snap Package - uses: snapcore/action-publish@v1 - env: - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_LOGIN }} - with: - snap: ${{ steps.build.outputs.snap }} - release: ${{ steps.prepare.outputs.RELEASE }} - - discord: - name: Send Discord Notification - needs: build-snap - if: always() && !contains(github.event.head_commit.message, '[skip ci]') - runs-on: ubuntu-20.04 - steps: - - name: Get Build Job Status - uses: technote-space/workflow-conclusion-action@v3 - - name: Combine Job Status - id: status - run: | - failures=(neutral, skipped, timed_out, action_required) - if [[ ${array[@]} =~ $WORKFLOW_CONCLUSION ]]; then - echo "status=failure" >> $GITHUB_OUTPUT - else - echo "status=$WORKFLOW_CONCLUSION" >> $GITHUB_OUTPUT - fi - - name: Post Status to Discord - uses: sarisia/actions-status-discord@v1 - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - status: ${{ steps.status.outputs.status }} - title: ${{ github.workflow }} - nofail: true diff --git a/.github/workflows/support.yml b/.github/workflows/support.yml deleted file mode 100644 index 8b45dcdc5..000000000 --- a/.github/workflows/support.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: 'Support requests' - -on: - issues: - types: [labeled, unlabeled, reopened] - -jobs: - support: - runs-on: ubuntu-20.04 - steps: - - uses: dessant/support-requests@v2 - with: - github-token: ${{ github.token }} - support-label: 'support' - issue-comment: > - :wave: @{issue-author}, we use the issue tracker exclusively - for bug reports and feature requests. However, this issue appears - to be a support request. Please use our support channels - to get help with Jellyseerr. - - - [Discord](https://discord.gg/ckbvBtDJgC) - - close-issue: true - lock-issue: true - issue-lock-reason: 'off-topic'