2021-01-24 14:56:53 +01:00
|
|
|
name: ci
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-08-03 23:12:12 +02:00
|
|
|
runs-on: ubuntu-latest
|
2021-08-03 23:28:13 +02:00
|
|
|
env:
|
|
|
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
2021-08-03 23:12:12 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: install go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2021-08-03 23:12:40 +02:00
|
|
|
go-version: 1.16
|
2021-08-03 23:12:12 +02:00
|
|
|
- name: build and test
|
|
|
|
run: make
|
|
|
|
- name: enable experimental docker features
|
2021-08-03 23:28:13 +02:00
|
|
|
if: ${{ github.ref == 'refs/heads/master' }}
|
2021-08-03 23:12:12 +02:00
|
|
|
run: |
|
|
|
|
echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
|
|
|
|
sudo service docker restart
|
|
|
|
- name: publish multi-arch docker image
|
2021-08-03 23:28:13 +02:00
|
|
|
if: ${{ github.ref == 'refs/heads/master' }}
|
2021-08-03 23:12:12 +02:00
|
|
|
run: make docker-pushx
|