-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stephan van Rooij
committed
Apr 10, 2020
1 parent
69d6ed3
commit d8e0401
Showing
7 changed files
with
10,092 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Docker build and push | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
buildx: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Set up Docker Buildx | ||
id: buildx | ||
uses: crazy-max/ghaction-docker-buildx@v1 | ||
with: | ||
version: latest | ||
- | ||
name: Available platforms | ||
run: echo ${{ steps.buildx.outputs.platforms }} | ||
- | ||
name: Docker login | ||
run: | ||
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | ||
- | ||
name: Run Buildx | ||
run: | | ||
docker buildx build \ | ||
--platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ | ||
--push \ | ||
-t svrooij/smartmeter:latest \ | ||
-t svrooij/smartmeter:$(echo $GITHUB_REF | cut -d'/' -f3) \ | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,4 +61,3 @@ typings/ | |
.next | ||
|
||
.vscode | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM node:current-alpine as build | ||
WORKDIR /usr/src/app | ||
COPY package*.json ./ | ||
RUN apk update &&\ | ||
apk add --no-cache make gcc g++ python linux-headers udev | ||
RUN npm ci --only=production | ||
COPY index.js ./ | ||
COPY ./lib/ ./lib/ | ||
|
||
FROM node:current-alpine | ||
WORKDIR /usr/src/app | ||
COPY --from=build /usr/src/app /usr/src/app | ||
EXPOSE 6329 | ||
CMD ["node", "./index.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.