netmaker/.github/workflows/publish-docker.yml

41 lines
1.1 KiB
YAML
Raw Normal View History

name: Publish Docker
2021-04-09 06:05:07 +08:00
on:
2021-04-07 23:30:04 +08:00
pull_request:
2021-04-09 06:05:07 +08:00
branches:
- 'develop'
- 'master'
2021-04-12 10:04:21 +08:00
jobs:
docker:
runs-on: ubuntu-latest
steps:
2021-04-09 06:05:07 +08:00
- name: Checkout
uses: actions/checkout@v2
2021-04-09 06:05:07 +08:00
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
2021-04-09 06:05:07 +08:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
2021-04-09 06:05:07 +08:00
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
2021-04-09 06:05:07 +08:00
- name: Build and push latest
if: github.base_ref == 'master'
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64, linux/arm64
push: true
2021-04-07 23:30:04 +08:00
tags: |
2021-04-09 06:05:07 +08:00
gravitl/netmaker:latest
- name: Build and push develop
if: github.base_ref == 'develop'
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64, linux/arm64
push: true
tags: |
2021-04-12 10:04:21 +08:00
gravitl/netmaker:develop