From 368388ee45b06d75fdf0b7afdf7a70456fe7b188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 20 Oct 2024 18:37:46 +0300 Subject: [PATCH] Remove other CI files --- .github/workflows/automerge.yml | 24 -------- .github/workflows/ci.yml | 29 --------- .github/workflows/docker-image.yml | 96 ------------------------------ .github/workflows/lint.yml | 13 ---- .github/workflows/pypi.yml | 68 --------------------- .github/workflows/test.yml | 31 ---------- 6 files changed, 261 deletions(-) delete mode 100644 .github/workflows/automerge.yml delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/docker-image.yml delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/pypi.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml deleted file mode 100644 index 38c6c0ea369..00000000000 --- a/.github/workflows/automerge.yml +++ /dev/null @@ -1,24 +0,0 @@ -on: - workflow_call: - secrets: - github-token: - required: true - -jobs: - # https://github.com/fastify/github-action-merge-dependabot - automerge: - name: Dependabot auto-merge - runs-on: ubuntu-20.04 - if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }} - - permissions: - pull-requests: write - contents: write - - steps: - - uses: fastify/github-action-merge-dependabot@v3.10.2 - with: - target: minor - github-token: ${{ secrets.github-token }} - -# vim:ft=yaml:et:ts=2:sw=2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 42b9b2ac19d..00000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: "CI" - -on: - push: - branches: - - main - tags: - - "*.*.*" - pull_request: - -jobs: - docker: - uses: ./.github/workflows/docker-image.yml - secrets: - github-token: ${{ secrets.GITHUB_TOKEN }} - - test: - uses: ./.github/workflows/test.yml - if: ${{ github.event_name == 'pull_request' }} - - automerge: - uses: ./.github/workflows/automerge.yml - needs: - - docker - - test - secrets: - github-token: ${{ secrets.GITHUB_TOKEN }} - -# vim:ft=yaml:et:ts=2:sw=2 diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml deleted file mode 100644 index 2a931d1d977..00000000000 --- a/.github/workflows/docker-image.yml +++ /dev/null @@ -1,96 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: Publish Docker image - -on: - workflow_call: - secrets: - github-token: - required: true - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - TEST_IMAGE: plextraktsync:ci-test - -jobs: - docker: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Set version variable - id: vars - run: | - if [[ "${GITHUB_REF#refs/heads/}" = "${GITHUB_REF}" ]]; then - APP_VERSION=${GITHUB_REF#refs/tags/} - else - git fetch --tags --unshallow - APP_VERSION=$(git describe --tags)_${GITHUB_REF#refs/heads/} - fi - echo "version=$APP_VERSION" >> $GITHUB_OUTPUT - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.github-token }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=ref,event=branch - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/0.') }} - - - name: Build and export to Docker - uses: docker/build-push-action@v6 - env: - APP_VERSION: ${{ steps.vars.outputs.version }} - with: - context: . - load: true - tags: ${{ env.TEST_IMAGE }} - build-args: | - APP_VERSION=${{ env.APP_VERSION }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Self-test Docker image - run: | - docker run -e TRACE=1 --rm ${{ env.TEST_IMAGE }} test - - - name: Build and push Docker image - uses: docker/build-push-action@v6 - env: - APP_VERSION: ${{ steps.vars.outputs.version }} - with: - context: . - platforms: linux/amd64,linux/arm64,linux/arm/v7 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - build-args: | - APP_VERSION=${{ env.APP_VERSION }} - cache-from: type=gha - cache-to: type=gha,mode=max -# vim:ts=2:sw=2:et diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 2b6b496a970..00000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Ruff Lint - -on: - - pull_request - -jobs: - ruff: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: chartboost/ruff-action@v1 - -# vim:ts=2:sw=2:et diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml deleted file mode 100644 index e332b4fd3fa..00000000000 --- a/.github/workflows/pypi.yml +++ /dev/null @@ -1,68 +0,0 @@ -# This workflow will upload a Python Package using Twine when a release is created -# For more information see: -# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries - -name: PyPI - -on: - workflow_dispatch: ~ - release: - types: [published] - push: - tags: - - "*.*.*" - -env: - DEFAULT_PYTHON: 3.9 - -jobs: - pypi: - name: Publish to PyPI - runs-on: ubuntu-latest - environment: - name: release - url: https://pypi.org/p/plextraktsync - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set version variable - id: vars - run: | - if [[ "${GITHUB_REF#refs/heads/}" = "${GITHUB_REF}" ]]; then - APP_VERSION=${GITHUB_REF#refs/tags/} - else - git fetch --tags --unshallow - version=$(git describe --tags --abbrev=0) - subver=${{ github.run_number }} - APP_VERSION=$version.post$subver - fi - echo "version=$APP_VERSION" >> $GITHUB_OUTPUT - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ env.DEFAULT_PYTHON }} - - - name: Install dependencies and build - env: - APP_VERSION: ${{ steps.vars.outputs.version }} - run: | - set -x - # APP_VERSION=$(git describe --tags) - echo "__version__ = '$APP_VERSION'" > plextraktsync/__init__.py - cat plextraktsync/__init__.py - python -c "from plextraktsync import __version__; print(__version__)" - python -m pip install --upgrade build - # - # Patch requirements.txt fpor setuptools-declarative-requirements: - # https://github.com/s0undt3ch/setuptools-declarative-requirements/issues/6 - sed -i -e '/^-i/d' requirements.txt - python -m build - - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN }} -# vim:ts=2:sw=2:et diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 67a5d5390b1..00000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Test - -on: - workflow_call: - -env: - DEFAULT_PYTHON: 3.9 - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Check out source repository - uses: actions/checkout@v4 - - name: Set up Python environment - uses: actions/setup-python@v5 - with: - python-version: ${{ env.DEFAULT_PYTHON }} - cache: pip - - name: Install dependencies (pip) - run: python -m pip install -r requirements.txt -r requirements.pipenv.txt - - name: Install dependencies (pipenv) - run: pipenv install --deploy - - name: Install test dependencies - run: pip install -r tests/requirements.txt - - - name: "Test: info" - run: ./plextraktsync.sh info - - name: "Test: pytest" - run: pytest -# vim:ts=2:sw=2:et