|
@@ -1,10 +1,11 @@
|
|
name: Publish Docker
|
|
name: Publish Docker
|
|
|
|
|
|
-on:
|
|
|
|
- pull_request:
|
|
|
|
- branches:
|
|
|
|
- - 'develop'
|
|
|
|
- - 'master'
|
|
|
|
|
|
+on:
|
|
|
|
+ pull_request:
|
|
|
|
+ branches:
|
|
|
|
+ - 'develop'
|
|
|
|
+ - 'master'
|
|
|
|
+jobs:
|
|
docker:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
steps:
|
|
@@ -16,7 +17,7 @@ on:
|
|
then
|
|
then
|
|
echo "TAG=latest" >>$GITHUB_ENV
|
|
echo "TAG=latest" >>$GITHUB_ENV
|
|
else
|
|
else
|
|
- echo "TAG=${{ github.head_ref}} >> $GITHUB_ENV
|
|
|
|
|
|
+ echo "TAG=${{ github.head_ref}}" >> $GITHUB_ENV
|
|
done
|
|
done
|
|
-
|
|
-
|
|
name: Checkout
|
|
name: Checkout
|
|
@@ -31,14 +32,14 @@ on:
|
|
name: Login to DockerHub
|
|
name: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
uses: docker/login-action@v1
|
|
with:
|
|
with:
|
|
- username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
- password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
-
|
|
-
|
|
name: Build and push
|
|
name: Build and push
|
|
uses: docker/build-push-action@v2
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
with:
|
|
- context: .
|
|
|
|
- platforms: linux/amd64, linux/arm64
|
|
|
|
- push: false
|
|
|
|
- tags: |
|
|
|
|
- nusak/netmaker:${{ env.TAG }}
|
|
|
|
|
|
+ context: .
|
|
|
|
+ platforms: linux/amd64, linux/arm64
|
|
|
|
+ push: false
|
|
|
|
+ tags: |
|
|
|
|
+ nusak/netmaker:${{ env.TAG }}
|