Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Commit

Permalink
chore: fix docker build and cross build even on pr (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Jun 12, 2020
1 parent 6afdc23 commit 9d48cf6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/dockerbuild.yml
Expand Up @@ -14,11 +14,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: crazy-max/ghaction-docker-buildx@v1

- name: Just build on PR
if: ${{ github.event_name == 'pull_request' }}
run: |
docker build -f docker/Dockerfile .
docker buildx build \
-f docker/Dockerfile \
--platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/386 \
-t robertslando/zwave2mqtt:dev \
.
- name: Login to dockerhub
if: ${{ github.event_name != 'pull_request' }}
Expand All @@ -28,9 +33,6 @@ jobs:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

- uses: crazy-max/ghaction-docker-buildx@v1
if: ${{ github.event_name != 'pull_request' }}

- name: Dev
if: ${{ github.ref == 'refs/heads/master'}}
run: |
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Expand Up @@ -4,7 +4,7 @@ FROM chrisns/openzwave:alpine as ozw

# ----------------
# STEP 2:
FROM node:12.18.0-alpine AS build-z2m
FROM node:erbium-alpine AS build-z2m

# Install required dependencies
RUN apk --no-cache add \
Expand Down Expand Up @@ -38,7 +38,7 @@ RUN rm -rf \

# ----------------
# STEP 3:
FROM node:12.18.0-alpine
FROM node:erbium-alpine

LABEL maintainer="robertsLando"

Expand Down

0 comments on commit 9d48cf6

Please sign in to comment.