|
@@ -4,6 +4,13 @@ on:
|
|
|
push:
|
|
|
branches:
|
|
|
- 'arm-docker'
|
|
|
+ - 'develop'
|
|
|
+ - 'main'
|
|
|
+ tags:
|
|
|
+ - 'v*.*.*'
|
|
|
+ pull_request:
|
|
|
+ branches:
|
|
|
+ - 'main'
|
|
|
jobs:
|
|
|
docker:
|
|
|
runs-on: ubuntu-latest
|
|
@@ -11,6 +18,22 @@ jobs:
|
|
|
-
|
|
|
name: Checkout
|
|
|
uses: actions/checkout@v2
|
|
|
+ -
|
|
|
+ name: Docker Meta
|
|
|
+ id: meta
|
|
|
+ uses: crazy-max/ghaction-docker-meta@v2
|
|
|
+ with:
|
|
|
+ #list of images to use as base name for tags
|
|
|
+ images: |
|
|
|
+ nusak/netmaker
|
|
|
+ # generate Docker tags based on following events/attributes
|
|
|
+ tags: |
|
|
|
+ type=ref,event=branch
|
|
|
+ type=ref,event=pr
|
|
|
+ type=semver,pattern={{version}}
|
|
|
+ type=semver,pattern={{major}}.{{minor}}
|
|
|
+ type=semver,pattern={{major}}
|
|
|
+ type=sha
|
|
|
-
|
|
|
name: Set up QEMU
|
|
|
uses: docker/setup-qemu-action@v1
|
|
@@ -29,6 +52,7 @@ jobs:
|
|
|
with:
|
|
|
context: .
|
|
|
platforms: linux/amd64, linux/arm64
|
|
|
- push: true
|
|
|
- tags: nusak/netmaker:latest
|
|
|
+ push: ${{ github.event_name != 'pull_request' }}
|
|
|
+ tags: ${{ steps.meta.output.tags }}
|
|
|
+ labels: ${{ steps.meta.output.labels }}
|
|
|
|