Skip to content

Commit

Permalink
👷 Add CI with GitHub actions (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Aug 16, 2020
1 parent 267da49 commit 3774600
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 19 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/deploy.yml
@@ -0,0 +1,18 @@
name: Deploy

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Deploy Image
run: bash scripts/build-push.sh
env:
NAME: latest
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
26 changes: 26 additions & 0 deletions .github/workflows/issue-manager.yml
@@ -0,0 +1,26 @@
name: Issue Manager

on:
schedule:
- cron: "0 0 * * *"
issue_comment:
types:
- created
- edited
issues:
types:
- labeled

jobs:
issue-manager:
runs-on: ubuntu-latest
steps:
- uses: tiangolo/issue-manager@0.3.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
config: >
{
"answered": {
"message": "Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues."
}
}
19 changes: 0 additions & 19 deletions .github/workflows/main.yml

This file was deleted.

15 changes: 15 additions & 0 deletions scripts/build-push.sh
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -e

use_tag="tiangolo/nginx-rtmp:$NAME"
use_dated_tag="${use_tag}-$(date -I)"

bash scripts/build.sh

docker tag "$use_tag" "$use_dated_tag"

bash scripts/docker-login.sh

docker push "$use_tag"
docker push "$use_dated_tag"
6 changes: 6 additions & 0 deletions scripts/build.sh
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -e

use_tag="tiangolo/nginx-rtmp:$NAME"

docker build -t "$use_tag" .
5 changes: 5 additions & 0 deletions scripts/docker-login.sh
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -e

echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin

0 comments on commit 3774600

Please sign in to comment.