mirror of
https://github.com/jakejarvis/npqueue.git
synced 2026-07-26 13:06:03 -04:00
deploy to heroku with docker and github action
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: Lint
|
||||
uses: actions-contrib/golangci-lint@master
|
||||
with:
|
||||
args: run
|
||||
- name: Setup Go 1.13
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.13
|
||||
id: go
|
||||
- name: Get dependencies
|
||||
run: go mod download
|
||||
- name: Build
|
||||
run: go build -v .
|
||||
- name: Heroku Login
|
||||
uses: actions/heroku@master
|
||||
env:
|
||||
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
|
||||
with:
|
||||
args: container:login
|
||||
- name: Heroku Push
|
||||
uses: actions/heroku@master
|
||||
env:
|
||||
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
|
||||
with:
|
||||
args: container:push -a npqueue web
|
||||
- name: Heroku Release
|
||||
uses: actions/heroku@master
|
||||
env:
|
||||
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
|
||||
with:
|
||||
args: container:release -a npqueue web
|
||||
@@ -1,40 +0,0 @@
|
||||
name: Go
|
||||
on: [push]
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.12
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.12
|
||||
id: go
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Download and install golangci-lint
|
||||
run: |
|
||||
curl -L https://github.com/golangci/golangci-lint/releases/download/v1.17.1/golangci-lint-1.17.1-linux-amd64.tar.gz | tar xzf - -C /tmp
|
||||
sudo mv /tmp/golangci-lint-1.17.1-linux-amd64/golangci-lint /usr/local/bin/golangci-lint
|
||||
|
||||
- name: Run the linter
|
||||
run: golangci-lint run
|
||||
|
||||
- name: Install deps
|
||||
run: go mod download
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
go get -v -t -d ./...
|
||||
if [ -f Gopkg.toml ]; then
|
||||
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||
dep ensure
|
||||
fi
|
||||
|
||||
- name: Build
|
||||
run: go build -v .
|
||||
|
||||
Reference in New Issue
Block a user