Merge pull request #37 from miguelvizdev/34

Convert workflow to yaml and add dependabot config
This commit is contained in:
Marc Campbell
2021-11-17 10:15:21 -10:00
committed by GitHub
2 changed files with 96 additions and 0 deletions

14
.github/dependabot.yaml vendored Normal file
View File

@@ -0,0 +1,14 @@
version: 2
updates:
# # Npm
- package-ecosystem: "npm"
directory: "/cloudflare"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/hooks"
schedule:
interval: "daily"

82
.github/workflows/main.yaml vendored Normal file
View File

@@ -0,0 +1,82 @@
name: Deploy to Heroku
on:
push:
resolves:
- "release registry"
- "release hooks"
- "release reaper"
jobs:
only master branch:
runs-on: ubuntu-latest
uses: actions/bin/filter@master
with:
args: "branch master"
heroku login:
needs: only master branch
uses: actions/heroku@master
with:
args: container:login
secrets:
- ${{secrets.HEROKU_API_KEY}}
build registry:
needs: heroku login
uses: actions/docker/cli@master
with:
args: "build -t registry.heroku.com/ttlsh/web registry"
push registry:
needs: build registry
with:
args: "push registry.heroku.com/ttlsh/web"
release registry:
needs: push registry
uses: actions/heroku@master
with:
args: "container:release -a ttlsh web"
secrets:
- ${{secrets.HEROKU_API_KEY}}
build hooks:
needs: heroku login
uses: actions/docker/cli@master
with:
args: "build -f hooks/Dockerfile.hooks -t registry.heroku.com/ttlsh-hooks/web hooks"
push hooks:
needs: build hooks
uses: actions/docker/cli@master
with:
args: "push registry.heroku.com/ttlsh-hooks/web"
release hooks:
needs: push hooks
uses: actions/heroku@master
with:
args: "container:release -a ttlsh-hooks web"
secrets:
- ${{secrets.HEROKU_API_KEY}}
build reaper:
needs: heroku login
uses: actions/docker/cli@master
with:
args: "build -f hooks/Dockerfile.reap -t registry.heroku.com/ttlsh-hooks/reap hooks"
push reaper:
needs: build reaper
uses: actions/docker/cli@master
with:
args: "push registry.heroku.com/ttlsh-hooks/reap"
release reaper:
needs: push reaper
uses: actions/heroku@master
with:
args: "container:release -a ttlsh-hooks reap"
secrets:
- ${{secrets.HEROKU_API_KEY}}