Skip to content

Commit

Permalink
ci(workflow): add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hldh214 committed Jan 25, 2022
1 parent f75a095 commit 126bfb0
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 7 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Docker Image CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types: [ published ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ These instructions will get you a copy of the project up and running on your loc

### From Docker

[![Docker Stars](https://img.shields.io/docker/stars/hldh214/recorder.svg)](https://hub.docker.com/r/hldh214/recorder/)
[![Docker Pulls](https://img.shields.io/docker/pulls/hldh214/recorder.svg)](https://hub.docker.com/r/hldh214/recorder/)
[![Docker Automated buil](https://img.shields.io/docker/automated/hldh214/recorder.svg)](https://hub.docker.com/r/hldh214/recorder/)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/hldh214/recorder/Docker%20Image%20CI.svg)](https://github.com/hldh214/recorder/pkgs/container/recorder)

``` sh
$ docker run -d --name recorder --restart always -v /path/to/your/config.toml:/app/config.toml -v /path/to/your/videos:/app/videos hldh214/recorder
``` shell
docker run -d --name recorder --restart always -v /path/to/your/config.toml:/app/config.toml -v /path/to/your/videos:/app/videos ghcr.io/hldh214/recorder
```

### Prerequisites
Expand All @@ -35,7 +33,7 @@ python >= 3.7

### Installing

```
``` shell
git clone https://github.com/hldh214/recorder.git
cd ./recorder
pip install -r requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name='recorder',
version='1.1.5',
version='1.10.0',
description='stream recorder && automatic upload',
long_description=readme,
author='Jim Liu',
Expand Down

0 comments on commit 126bfb0

Please sign in to comment.