aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..aea27d1
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,30 @@
+name: ci
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ env:
+ DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
+ DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
+ steps:
+ - uses: actions/checkout@v2
+ - name: install go
+ uses: actions/setup-go@v2
+ with:
+ go-version: 1.16
+ - name: build and test
+ run: make
+ - name: enable experimental docker features
+ if: ${{ github.ref == 'refs/heads/master' }}
+ run: |
+ echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
+ sudo service docker restart
+ - name: publish multi-arch docker image
+ if: ${{ github.ref == 'refs/heads/master' }}
+ run: make docker-pushx