From cc2938010d9387ab793921d190198ae1b5cbe451 Mon Sep 17 00:00:00 2001 From: Chip Wolf Date: Sat, 27 Mar 2021 20:13:07 +0000 Subject: [PATCH 1/2] feat(docker): add arm support --- .github/workflows/main.yaml | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..17f06c6 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,60 @@ +name: Docker + +on: + workflow_dispatch: + push: + branches: + - main + - development + tags: + - "*" + +jobs: + docker: + name: Docker + runs-on: ubuntu-latest + defaults: + run: + shell: bash + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set Docker Tag + id: tag + run: | + if [[ $GITHUB_REF == refs/tags/* ]]; then + DOCKER_TAG="${GITHUB_REF:10}" + elif [[ $GITHUB_REF == refs/heads/development ]]; then + DOCKER_TAG="dev" + elif [[ $GITHUB_REF == refs/heads/main ]]; then + DOCKER_TAG="latest" + else + DOCKER_TAG="${GITHUB_REF:11}" + fi + echo ::set-output name=tag::${DOCKER_TAG} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and Push Docker Image + if: github.ref == 'refs/heads/development' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + context: . + file: ./Dockerfile + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8 + tags: whatdaybob/sonarr_youtubedl:${{ steps.tag.outputs.tag }} From 0fdae4bd81495cc9e4c30da3bcd74eed28b7cbe3 Mon Sep 17 00:00:00 2001 From: Beheadedstraw Date: Fri, 11 Feb 2022 14:25:42 -0600 Subject: [PATCH 2/2] Bump Python to 3.9 Ubuntu 20 (and related distros) doesn't come with 3.7 in it's repos, current docker can't find libpython3.7m.so.1.0. This bumps to a supported version without breaking any code/requirements. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9fa1497..ffed93e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.7-buster +FROM python:3.9-buster LABEL maintainer="Martin Jones " # Update and install ffmpeg @@ -36,4 +36,4 @@ RUN \ # ENV setup ENV CONFIGPATH /config/config.yml -CMD [ "python", "-u", "/app/sonarr_youtubedl.py" ] \ No newline at end of file +CMD [ "python", "-u", "/app/sonarr_youtubedl.py" ]