Skip to content

Commit

Permalink
Merge pull request #26 from Beheadedstraw/patch-1
Browse files Browse the repository at this point in the history
Bump Python to 3.9
  • Loading branch information
whatdaybob authored Apr 8, 2022
2 parents 4650e7c + 350609c commit ddd8671
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 2 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-buster
FROM python:3.9-buster
LABEL maintainer="Martin Jones <[email protected]>"

# Update and install ffmpeg
Expand Down Expand Up @@ -36,4 +36,4 @@ RUN \
# ENV setup
ENV CONFIGPATH /config/config.yml

CMD [ "python", "-u", "/app/sonarr_youtubedl.py" ]
CMD [ "python", "-u", "/app/sonarr_youtubedl.py" ]

0 comments on commit ddd8671

Please sign in to comment.