This commit is contained in:
Cristian 2021-07-07 00:54:58 -04:00 committed by GitHub
commit 0825ad61e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 88 additions and 5 deletions

61
.github/workflows/docker-publish.yml vendored Normal file
View File

@ -0,0 +1,61 @@
name: Docker
# 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.
on:
push:
branches: [ master ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ master ]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM python:3.8-alpine
WORKDIR /uploads
VOLUME /uploads
RUN apk add gcc musl-dev libffi-dev openssl-dev
RUN pip install updog
EXPOSE 9090
CMD ["updog"]

View File

@ -1,8 +1,8 @@
![Version 1.4](http://img.shields.io/badge/version-v1.4-green.svg)
![Python 3.8](http://img.shields.io/badge/python-3.8-blue.svg)
[![MIT License](http://img.shields.io/badge/license-MIT%20License-blue.svg)](https://github.com/sc0tfree/updog/blob/master/LICENSE)
[![sc0tfree Twitter](http://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Follow)](https://twitter.com/sc0tfree)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/sc0tfree/updog?color=success&style=flat-square)
![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg?style=flat-square)
![GitHub](https://img.shields.io/github/license/crstian19/updog?color=blue&logoColor=blue&style=flat-square)
![Docker Pulls](https://img.shields.io/docker/pulls/crstian/updog?logo=Docker&style=flat-square)
![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/crstian/updog?logo=Docker&style=flat-square)
<p>
<img src="https://sc0tfree.squarespace.com/s/updog.png" width=85px alt="updog"/>
</p>

9
docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
version: '3'
services:
updong:
build: .
volumes:
- '/YOUR/PATH:/uploads'
ports:
- 9090:9090
restart: unless-stopped