Skip to content

Commit 3feaf88

Browse files
authored
Buildx gh actions (#20)
* submodule and dependabot * update licence * initial build of docker image in github * update docker file * add docker ci badge * buildx * use buildx-module * remove normal docker build * give docker build context * remove docker hub hooks * remove noise and build a latest * remove redundant docker stuff * remove redundant params * buildx
1 parent 72d2331 commit 3feaf88

File tree

10 files changed

+58
-60
lines changed

10 files changed

+58
-60
lines changed

.dependabot/config.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 1
2+
3+
update_configs:
4+
- package_manager: "docker"
5+
directory: "/"
6+
update_schedule: "daily"
7+
automerged_updates:
8+
- match:
9+
dependency_type: "all"
10+
update_type: security:patch
11+
- package_manager: "submodules"
12+
directory: "/"
13+
update_schedule: "daily"
14+
automerged_updates:
15+
- match:
16+
dependency_type: "all"
17+
update_type: all

.github/workflows/docker.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Docker Image CI
2+
on: [push]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- uses: actions/checkout@v1
10+
with:
11+
submodules: true
12+
13+
- uses: crazy-max/ghaction-docker-buildx@v1
14+
15+
- name: Docker login
16+
env:
17+
docker_username: ${{ secrets.docker_username }}
18+
docker_password: ${{ secrets.docker_password }}
19+
run: docker login -u $docker_username -p ${docker_password}
20+
21+
- name: Run Buildx
22+
run: |
23+
docker buildx build \
24+
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x \
25+
-t ${GITHUB_REPOSITORY}:sha-${GITHUB_SHA} --push .
26+
27+
- name: Push latest
28+
if: github.ref == 'refs/heads/master'
29+
run: |
30+
docker buildx build \
31+
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x \
32+
-t ${GITHUB_REPOSITORY}:latest --push .

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "node-sonos"]
2+
path = node-sonos
3+
url = https://github.com/jishi/node-sonos-http-api.git

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ FROM node:13-alpine
22

33
WORKDIR /app
44

5-
RUN apk --no-cache add tar curl && \
6-
curl -L https://github.com/jishi/node-sonos-http-api/archive/master.tar.gz | tar xz --strip-components=1 -C /app && \
7-
mkdir cache && \
5+
COPY node-sonos /app
6+
7+
RUN mkdir cache && \
88
ln -s settings/settings.json && \
99
chown -R node:node static cache && \
1010
npm install --production && \

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Chris Nesbitt-Smith
3+
Copyright (c) 2020 Chris Nesbitt-Smith
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Docker wrapper for https://github.com/jishi/node-sonos-http-api
1111
[![Docker Build Statu](https://img.shields.io/docker/build/chrisns/docker-node-sonos-http-api.svg)](https://hub.docker.com/r/chrisns/docker-node-sonos-http-api)
1212
[![ImageLayers Size](https://img.shields.io/imagelayers/image-size/chrisns/docker-node-sonos-http-api/latest.svg)](https://hub.docker.com/r/chrisns/docker-node-sonos-http-api)
1313
[![ImageLayers Layers](https://img.shields.io/imagelayers/layers/chrisns/docker-node-sonos-http-api/latest.svg)](https://hub.docker.com/r/chrisns/docker-node-sonos-http-api)
14+
![Docker Image CI](https://github.com/chrisns/docker-node-sonos-http-api/workflows/Docker%20Image%20CI/badge.svg?branch=master)
1415

1516
## Usage
1617
Refer to https://github.com/jishi/node-sonos-http-api for all the configuration detail

arm32v7-crossbuild/Dockerfile

Lines changed: 0 additions & 32 deletions
This file was deleted.

arm32v7-nativebuild/Dockerfile

Lines changed: 0 additions & 21 deletions
This file was deleted.

hooks/post_push

Lines changed: 0 additions & 3 deletions
This file was deleted.

node-sonos

Submodule node-sonos added at 91284cb

0 commit comments

Comments
 (0)