Compare commits

...

10 Commits

Author SHA1 Message Date
488a0ca9d2
fix: automerge 2022-07-27 10:27:26 +02:00
4c4b2e9c88
fix: run dependabot 2022-07-27 10:02:56 +02:00
b0ca1ea6d6
fix: cleanup go modules 2022-07-27 09:54:56 +02:00
d207c5162b
fix(ci): apt 2022-07-27 09:40:36 +02:00
92f571648d
fix(ci): apt 2022-07-27 09:37:49 +02:00
e5347b468c
fix(ci): apt 2022-07-27 09:35:15 +02:00
cb9afec68d
fix(ci): permissions and registry 2022-07-27 09:33:18 +02:00
eae1c98c6a
fix(ci): permissions and registry 2022-07-27 09:27:47 +02:00
045a45d4d2
fix(ci): add github workflow 2022-07-27 09:25:09 +02:00
3a116c2f34
fix(ci): travis jobs 2020-01-26 16:13:40 +01:00
7 changed files with 130 additions and 54 deletions

35
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,35 @@
version: 2
updates:
# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
assignees:
- "volker-raschek"
labels:
- "dependabot"
- "dependabot/docker"
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
assignees:
- "volker-raschek"
labels:
- "dependabot"
- "dependabot/github-actions"
# Maintain dependencies for golang
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
assignees:
- "volker-raschek"
labels:
- "dependabot"
- "dependabot/gomod"

19
.github/workflows/auto-merge.yaml vendored Normal file
View File

@ -0,0 +1,19 @@
name: auto-merge
on:
pull_request:
jobs:
auto-merge:
permissions:
actions: read
checks: read
contents: write
statuses: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
target: minor
github-token: ${{ secrets.GITHUB_TOKEN }}

41
.github/workflows/build-latest.yaml vendored Normal file
View File

@ -0,0 +1,41 @@
name: build-latest
on:
push:
branches:
- master
pull_request:
types: [ opened, reopened ]
env:
CONTAINER_RUNTIME: docker
jobs:
cancel:
runs-on:
- ubuntu-22.04
steps:
- name: cancel previous runs
uses: styfle/cancel-workflow-action@0.9.1
with:
all_but_latest: true
access_token: ${{ github.token }}
build-amd64-latest:
runs-on:
- ubuntu-22.04
needs:
- cancel
steps:
- name: clone
uses: actions/checkout@v2
- name: update apt cache
run: sudo apt update --yes
- name: upgrade packages
run: sudo apt upgrade --yes
- name: install build-essential
run: sudo apt install --yes build-essential
- name: set up docker
uses: docker-practice/actions-setup-docker@master
- name: build
run: make container-image/build/amd64

View File

@ -8,21 +8,26 @@ stages:
jobs: jobs:
include: include:
- name: "Compile golang binaries inside a container image" - name: build-linux-amd64
stage: build stage: build
script: make container-run/all script: make container-run/bin/linux/amd64/dhdu
# - name: "Test golang binaries inside a container image"
- name: build-linux-arm5
stage: build
script: make container-run/bin/linux/arm/5/dhdu
- name: build-linux-arm7
stage: build
script: make container-run/bin/linux/arm/7/dhdu
# - name: test-linux-amd64
# stage: test # stage: test
# script: make container-run/test # script: make container-run/test/unit
# after_script: bash <(curl -s https://codecov.io/bash) # after_script: bash <(curl -s https://codecov.io/bash)
- name: "Deploy container-image tagged as latest"
- name: deploy-container-amd64
stage: deploy stage: deploy
script: make container-image/push script: make container-image/push/amd64
- name: "Deploy container-image tagged with a git tag"
stage: deploy
script: make container-image/push VERSION=${TRAVIS_TAG} CONTAINER_IMAGE_VERSION=${TRAVIS_TAG}
on:
tags: true
notifications: notifications:
email: email:

View File

@ -4,14 +4,6 @@
# VERSION?=$(shell git describe --abbrev=0)+hash.$(shell git rev-parse --short HEAD) # VERSION?=$(shell git describe --abbrev=0)+hash.$(shell git rev-parse --short HEAD)
VERSION?=0.0.0+hash.$(shell git rev-parse --short HEAD) VERSION?=0.0.0+hash.$(shell git rev-parse --short HEAD)
# GOPROXY settings
# If no GOPROXY environment variable available, the pre-defined GOPROXY from go
# env to download and validate go modules is used. Exclude downloading and
# validation of all private modules which are pre-defined in GOPRIVATE. If no
# GOPRIVATE variable defined, the variable of go env is used.
GOPROXY?=$(shell go env GOPROXY)
GOPRIVATE?=$(shell go env GOPRIVATE)
# EXECUTABLE # EXECUTABLE
# Executable binary which should be compiled for different architecures # Executable binary which should be compiled for different architecures
EXECUTABLE:=dhdu EXECUTABLE:=dhdu
@ -153,8 +145,8 @@ container-image/build/amd64:
--build-arg BUILD_IMAGE=${BUILD_IMAGE_FULL} \ --build-arg BUILD_IMAGE=${BUILD_IMAGE_FULL} \
--build-arg EXECUTABLE=${EXECUTABLE} \ --build-arg EXECUTABLE=${EXECUTABLE} \
--build-arg EXECUTABLE_TARGET=bin/linux/amd64/${EXECUTABLE} \ --build-arg EXECUTABLE_TARGET=bin/linux/amd64/${EXECUTABLE} \
--build-arg GOPROXY=${GOPROXY} \ --build-arg GOPROXY \
--build-arg GOPRIVATE=${GOPRIVATE} \ --build-arg GOPRIVATE \
--build-arg VERSION=${VERSION} \ --build-arg VERSION=${VERSION} \
--file Dockerfile \ --file Dockerfile \
--no-cache \ --no-cache \

14
go.mod
View File

@ -1,12 +1,16 @@
module github.com/volker-raschek/docker-hub-description-updater module github.com/volker-raschek/docker-hub-description-updater
go 1.13 go 1.18
require ( require (
github.com/Masterminds/semver v1.5.0
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-flucky/flucky v0.0.0-20190714170626-0dd156f480be
github.com/spf13/cobra v0.0.3 github.com/spf13/cobra v0.0.3
github.com/stretchr/testify v1.4.0 github.com/stretchr/testify v1.4.0
github.com/volker-raschek/go-logger v0.0.0-20190924133618-4a42099e655f )
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
gopkg.in/yaml.v2 v2.2.2 // indirect
) )

36
go.sum
View File

@ -1,38 +1,18 @@
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/d2r2/go-bsbmp v0.0.0-20190515110334-3b4b3aea8375/go.mod h1:3iz1WHlYJU9b4NJei+Q8G7DN3K05arcCMlOQ+qNCDjo=
github.com/d2r2/go-i2c v0.0.0-20181113114621-14f8dd4e89ce/go.mod h1:AwxDPnsgIpy47jbGXZHA9Rv7pDkOJvQbezPuK1Y+nNk=
github.com/d2r2/go-logger v0.0.0-20181221090742-9998a510495e/go.mod h1:oA+9PUt8F1aKJ6o4YU1T120i7sgo1T6/1LWEEBy0BSs=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-flucky/flucky v0.0.0-20190714170626-0dd156f480be h1:jCs/SAXdXUA0aqvEVH0wyeGpJzYOZ1XC9Kpm5anSY5E= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/go-flucky/flucky v0.0.0-20190714170626-0dd156f480be/go.mod h1:WNT729lCsTFhT6Vyvg6cG8aHV1t6p+DsA8l4omOuaos=
github.com/go-flucky/go-dht v0.1.1/go.mod h1:Yk/cct+/u+eCS7pB/kc0tc7MrVXdFI4W15MJCj5FRUc=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stianeikeland/go-rpio v4.2.0+incompatible/go.mod h1:Sh81rdJwD96E2wja2Gd7rrKM+XZ9LrwvN2w4IXrqLR8=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.3.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/volker-raschek/go-logger v0.0.0-20190924133618-4a42099e655f h1:e14Zt+f1EQkiwAorEkMO97S/bTUcoVLZAvgAR8yy/yc=
github.com/volker-raschek/go-logger v0.0.0-20190924133618-4a42099e655f/go.mod h1:V4TEAy1Kx45GPlB2VvS5mVpNfSksNDDuEgk7wm7cd0k=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/yaml.v2 v2.2.1 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
periph.io/x/periph v3.4.0+incompatible/go.mod h1:EWr+FCIU2dBWz5/wSWeiIUJTriYv9v2j2ENBmgYyy7Y=