-
Notifications
You must be signed in to change notification settings - Fork 13
47 lines (45 loc) · 1.29 KB
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: push-pipeline
on:
push:
branches:
- master
- v*
jobs:
changes:
runs-on: ubuntu-latest
# Set job outputs to values from filter step
outputs:
frontend: ${{ steps.filter.outputs.client }}
webserver: ${{ steps.filter.outputs.webserver }}
nginx: ${{ steps.filter.outputs.nginx }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
frontend:
- 'client/**'
webserver:
- 'server/**'
nginx:
- 'nginx/**'
build:
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.webserver == 'true'
steps:
# Check-out your repository.
- name: Checkout
uses: actions/checkout@v2
- name: Build, Push and Release a Docker container to Heroku.
uses: gonuit/heroku-docker-deploy@v1.3.2
with:
email: ${{ secrets.HEROKU_EMAIL }}
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ secrets.HEROKU_APPNAME }}
dockerfile_directory: ./server
dockerfile_name: Dockerfile
docker_options: '--no-cache'
process_type: web