mirror of https://github.com/mpolden/echoip
Merge pull request #142 from mpolden/limit-deploy
build: Limit deploy to master branch
This commit is contained in:
commit
67f5a9e5a8
|
@ -8,21 +8,25 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: install go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.16
|
||||||
|
- name: build and test
|
||||||
|
run: make
|
||||||
|
deploy:
|
||||||
|
if: ${{ github.ref == 'refs/heads/master' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: enable experimental docker features
|
||||||
- name: install go
|
run: |
|
||||||
uses: actions/setup-go@v2
|
echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
|
||||||
with:
|
sudo service docker restart
|
||||||
go-version: 1.15
|
- name: publish multi-arch docker image
|
||||||
- name: build and test
|
run: make docker-pushx
|
||||||
run: make
|
|
||||||
- name: enable experimental docker features
|
|
||||||
run: |
|
|
||||||
echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
|
|
||||||
sudo service docker restart
|
|
||||||
- name: publish multi-arch docker image
|
|
||||||
run: make docker-pushx
|
|
||||||
|
|
Loading…
Reference in New Issue