mirror of
https://github.com/gravitl/netmaker.git
synced 2025-11-11 17:20:34 +08:00
Merge pull request #83 from gravitl/arm-docker
Simplify git action for dockerfile creation
This commit is contained in:
commit
fad2138d7e
2 changed files with 16 additions and 42 deletions
33
.github/workflows/publish-docker-latest.yml
vendored
33
.github/workflows/publish-docker-latest.yml
vendored
|
|
@ -1,33 +0,0 @@
|
||||||
name: Publish Docker
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
jobs:
|
|
||||||
docker:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
-
|
|
||||||
name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v1
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v1
|
|
||||||
-
|
|
||||||
name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
-
|
|
||||||
name: Build and push
|
|
||||||
uses: docker/build-push-action@v2
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
platforms: linux/amd64, linux/arm64
|
|
||||||
push: true
|
|
||||||
tags: gravitl/netmaker:latest
|
|
||||||
15
.github/workflows/publish-docker.yml
vendored
15
.github/workflows/publish-docker.yml
vendored
|
|
@ -1,15 +1,18 @@
|
||||||
name: Publish Docker
|
name: Publish Docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- 'arm-docker'
|
|
||||||
- 'develop'
|
- 'develop'
|
||||||
-
|
- 'master'
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: FranzDiebold/github-env-vars-action@v2
|
||||||
|
- name: Set Environment Variables
|
||||||
|
run: |
|
||||||
|
echo "BUILD_VER=v0.0.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
@ -32,4 +35,8 @@ jobs:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64, linux/arm64
|
platforms: linux/amd64, linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: gravitl/netmaker:dev
|
tags: |
|
||||||
|
gravitl/netmaker:${{ env.CI_REF_NAME_SLUG }}
|
||||||
|
gravitl/netmaker:${{ env.BUILD_VER }}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue