diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 00000000000..e7ede14fa82 --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,24 @@ +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.0.0 + 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 new file mode 100644 index 00000000000..42b9b2ac19d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +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 index a824dcc1b51..2a931d1d977 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -6,12 +6,10 @@ name: Publish Docker image on: - push: - branches: - - main - tags: - - "*.*.*" - pull_request: + workflow_call: + secrets: + github-token: + required: true env: REGISTRY: ghcr.io @@ -19,7 +17,7 @@ env: TEST_IMAGE: plextraktsync:ci-test jobs: - build-and-push-image: + docker: runs-on: ubuntu-latest permissions: contents: read @@ -51,7 +49,7 @@ jobs: with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ secrets.github-token }} - name: Extract metadata (tags, labels) for Docker id: meta diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7fb85ef6d45..a10f937fa6b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,7 @@ name: Test on: - - pull_request + workflow_call: env: DEFAULT_PYTHON: 3.8 @@ -9,7 +9,6 @@ env: jobs: test: runs-on: ubuntu-latest - name: Test steps: - name: Check out source repository uses: actions/checkout@v4 diff --git a/Pipfile b/Pipfile index 9b2d8d7ca9f..fa79ca44d54 100644 --- a/Pipfile +++ b/Pipfile @@ -15,13 +15,13 @@ click = "==8.1.7" decorator = "==5.1.1" deprecated = "==1.2.14" humanize = "==4.10.0" -idna = {version="==3.8", python_version=">='3.5'"} +idna = {version="==3.10", python_version=">='3.5'"} inquirerpy = "==0.3.4" markdown-it-py = {version="==3.0.0", python_version=">='3.7'"} mdurl = {version="==0.1.2", python_version=">='3.7'"} oauthlib = "==3.2.2" pfzy = {version="==0.3.4", markers="python_version >= '3.7' and python_version < '4.0'"} -platformdirs = {version="==4.3.2", python_version=">='3.7'"} +platformdirs = {version="==4.3.3", python_version=">='3.7'"} plexapi = "==4.15.16" pluggy = "==1.5.0" prompt-toolkit = "==3.0.47" diff --git a/Pipfile.lock b/Pipfile.lock index 899d0036949..7a61e229417 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "fe9728dbbfd8fb2d57cbbf892b835155345c76f56f0dcbee2f31c4a173a80c3e" + "sha256": "cf7fe8ea49a0350141ea669ff4c07ba40f97034c9d88aab3b3264e3ea71d6eaf" }, "pipfile-spec": 6, "requires": { @@ -192,12 +192,12 @@ }, "idna": { "hashes": [ - "sha256:050b4e5baadcd44d760cedbd2b8e639f2ff89bbc7a5730fcc662954303377aac", - "sha256:d838c2c0ed6fced7693d5e8ab8e734d5f8fda53a039c0164afb0b82e771e3603" + "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", + "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3" ], "index": "pypi", "markers": "python_version >= '3.6'", - "version": "==3.8" + "version": "==3.10" }, "inquirerpy": { "hashes": [ @@ -242,12 +242,12 @@ }, "platformdirs": { "hashes": [ - "sha256:9e5e27a08aa095dd127b9f2e764d74254f482fef22b0970773bfba79d091ab8c", - "sha256:eb1c8582560b34ed4ba105009a4badf7f6f85768b30126f351328507b2beb617" + "sha256:50a5450e2e84f44539718293cbb1da0a0885c9d14adf21b77bae4e66fc99d9b5", + "sha256:d4e0b7d8ec176b341fb03cb11ca12d0276faa8c485f9cd218f613840463fc2c0" ], "index": "pypi", "markers": "python_version >= '3.8'", - "version": "==4.3.2" + "version": "==4.3.3" }, "plexapi": { "hashes": [ diff --git a/requirements.txt b/requirements.txt index 11a8e33ba6a..dec5c986d6a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,13 +9,13 @@ decorator==5.1.1 deprecated==1.2.14 exceptiongroup==1.2.2; python_version >= '3.7' humanize==4.10.0; python_version >= '3.8' -idna==3.8; python_version >= '3.6' +idna==3.10; python_version >= '3.6' inquirerpy==0.3.4 markdown-it-py==3.0.0; python_version >= '3.7' and python_version >= '3.8' mdurl==0.1.2; python_version >= '3.7' oauthlib==3.2.2 pfzy==0.3.4; python_version >= '3.7' and python_version < '4.0' -platformdirs==4.3.2; python_version >= '3.8' +platformdirs==4.3.3; python_version >= '3.8' plexapi==4.15.16; python_version >= '3.8' pluggy==1.5.0 prompt-toolkit==3.0.47; python_full_version >= '3.7.0'