Compare commits
6 Commits
386cc11296
...
923855147e
Author | SHA1 | Date | |
---|---|---|---|
923855147e | |||
198ad8fbe6 | |||
09fa64d628 | |||
9197d202bc | |||
4817742fb1 | |||
3f44945075 |
124
.drone.yml
124
.drone.yml
@ -1,124 +0,0 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: linter
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: markdown lint
|
||||
commands:
|
||||
- markdownlint *.md
|
||||
image: git.cryptic.systems/volker.raschek/markdownlint:0.43.0
|
||||
resources:
|
||||
limits:
|
||||
cpu: 150
|
||||
memory: 150M
|
||||
|
||||
- name: golangci lint
|
||||
commands:
|
||||
- golangci-lint run
|
||||
image: docker.io/golangci/golangci-lint:v1.64.8-alpine
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500
|
||||
memory: 1G
|
||||
|
||||
- name: email-notification
|
||||
environment:
|
||||
SMTP_FROM_ADDRESS:
|
||||
from_secret: smtp_from_address
|
||||
SMTP_FROM_NAME:
|
||||
from_secret: smtp_from_name
|
||||
SMTP_HOST:
|
||||
from_secret: smtp_host
|
||||
SMTP_USERNAME:
|
||||
from_secret: smtp_username
|
||||
SMTP_PASSWORD:
|
||||
from_secret: smtp_password
|
||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||
resources:
|
||||
limits:
|
||||
cpu: 150
|
||||
memory: 150M
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
trigger:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: unit-test-amd64
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
depends_on:
|
||||
- linter
|
||||
|
||||
node_selector:
|
||||
kubernetes.io/arch: amd64
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: unit-test
|
||||
commands:
|
||||
- go test -v ./...
|
||||
image: docker.io/library/golang:1.24.1
|
||||
resources:
|
||||
limits:
|
||||
cpu: 250
|
||||
memory: 500M
|
||||
|
||||
trigger:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: unit-test-arm64
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
depends_on:
|
||||
- linter
|
||||
|
||||
# node_selector:
|
||||
# kubernetes.io/arch: arm64
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm64
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: unit-test
|
||||
commands:
|
||||
- go test -v ./...
|
||||
image: docker.io/library/golang:1.24.1
|
||||
# resources:
|
||||
# limits:
|
||||
# cpu: 250
|
||||
# memory: 500M
|
||||
|
||||
trigger:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
22
.gitea/workflows/golang-tests.yaml
Normal file
22
.gitea/workflows/golang-tests.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
name: Golang Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [ "opened", "reopened", "synchronize" ]
|
||||
push:
|
||||
branches: [ '**' ]
|
||||
tags-ignore: [ '**' ]
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
unittest:
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
go-version: stable
|
||||
- env:
|
||||
GOPROXY: ${{ vars.GOPROXY }}
|
||||
run: make test/unit
|
19
.gitea/workflows/markdown-linters.yaml
Normal file
19
.gitea/workflows/markdown-linters.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
name: Markdown linter
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [ "opened", "reopened", "synchronize" ]
|
||||
push:
|
||||
branches: [ '**' ]
|
||||
tags-ignore: [ '**' ]
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
markdown-lint:
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: DavidAnson/markdownlint-cli2-action@v19.1.0
|
||||
with:
|
||||
globs: '**/*.md'
|
52
.gitea/workflows/release.yaml
Normal file
52
.gitea/workflows/release.yaml
Normal file
@ -0,0 +1,52 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: [ '**' ]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: docker/setup-qemu-action@v3.6.0
|
||||
- uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
go-version: stable
|
||||
- uses: docker/login-action@v3.4.0
|
||||
with:
|
||||
registry: git.cryptic.systems
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||
- env:
|
||||
GITEA_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||
GONOSUMDB: ${{ vars.GONOSUMDB }}
|
||||
GOPROXY: ${{ vars.GOPROXY }}
|
||||
uses: goreleaser/goreleaser-action@v6.3.0
|
||||
with:
|
||||
version: "~> v2"
|
||||
args: release --clean
|
||||
|
||||
sync-to-hub-docker-io:
|
||||
needs:
|
||||
- release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Copy images to docker.io
|
||||
run: |
|
||||
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
|
||||
|
||||
apt-get update --yes
|
||||
apt-get install --yes skopeo
|
||||
skopeo copy \
|
||||
--all \
|
||||
--dest-password ${{ secrets.DOCKER_IO_PASSWORD }} \
|
||||
--dest-username ${{ secrets.DOCKER_IO_USERNAME }} \
|
||||
--src-password ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }} \
|
||||
--src-username volker.raschek \
|
||||
docker://git.cryptic.systems/volker.raschek/dyndns-client:${TAG} \
|
||||
docker://docker.io/volkerraschek/dyndns-client:${TAG}
|
20
.gitea/workflows/update-docker-hub-description.yaml
Normal file
20
.gitea/workflows/update-docker-hub-description.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
name: Update Docker Hub Description
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master' ]
|
||||
paths: [ 'README.md' ]
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
update-description-on-hub-docker-io:
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: peter-evans/dockerhub-description@v4.0.2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_IO_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_IO_PASSWORD }}
|
||||
repository: volkerraschek/dyndns-client
|
||||
readme-filepath: README.md
|
154
.goreleaser.yaml
Normal file
154
.goreleaser.yaml
Normal file
@ -0,0 +1,154 @@
|
||||
project_name: dyndns-client
|
||||
|
||||
archives:
|
||||
- formats: [ "tar.xz" ]
|
||||
files:
|
||||
- README.md
|
||||
- LICENSE
|
||||
|
||||
before:
|
||||
hooks:
|
||||
- go mod tidy
|
||||
|
||||
builds:
|
||||
- main: main.go
|
||||
binary: >-
|
||||
{{ .ProjectName }}-
|
||||
{{- .Version }}-
|
||||
{{- .Os }}-
|
||||
{{- if eq .Arch "amd64" }}amd64
|
||||
{{- else if eq .Arch "amd64_v1" }}amd64
|
||||
{{- else }}{{ .Arch }}{{ end }}
|
||||
{{- if .Arm }}-{{ .Arm }}{{ end }}
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
- GONOSUMDB={{ .Env.GONOSUMDB }}
|
||||
- GOPROXY={{ .Env.GOPROXY }}
|
||||
goos:
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
goarm:
|
||||
- "6"
|
||||
- "7"
|
||||
flags:
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- -s -w -X 'main.version={{ trimprefix .Tag "v" }}'
|
||||
|
||||
changelog:
|
||||
filters:
|
||||
exclude:
|
||||
- '^chore'
|
||||
- '^docs'
|
||||
- '^test'
|
||||
- Merge pull request
|
||||
- Merge branch
|
||||
- go mod tidy
|
||||
format: "{{.SHA}}: {{.Message}} (@{{.AuthorUsername}})"
|
||||
groups:
|
||||
- title: Features
|
||||
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
|
||||
order: 0
|
||||
- title: "Bug fixes"
|
||||
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
|
||||
order: 1
|
||||
- title: Others
|
||||
order: 999
|
||||
sort: asc
|
||||
use: git
|
||||
|
||||
dockers:
|
||||
- build_flag_templates:
|
||||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||
- --label=org.opencontainers.image.source={{ .GitURL }}
|
||||
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
||||
- --platform=linux/amd64
|
||||
- --pull
|
||||
dockerfile: Dockerfile
|
||||
goarch: amd64
|
||||
goos: linux
|
||||
image_templates:
|
||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-amd64'
|
||||
skip_push: false
|
||||
use: buildx
|
||||
|
||||
- build_flag_templates:
|
||||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||
- --label=org.opencontainers.image.source={{ .GitURL }}
|
||||
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
||||
- --platform=linux/arm/v6
|
||||
- --pull
|
||||
dockerfile: Dockerfile
|
||||
goarch: arm
|
||||
goarm: "6"
|
||||
goos: linux
|
||||
image_templates:
|
||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v6'
|
||||
skip_push: false
|
||||
use: buildx
|
||||
|
||||
- build_flag_templates:
|
||||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||
- --label=org.opencontainers.image.source={{ .GitURL }}
|
||||
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
||||
- --platform=linux/arm/v7
|
||||
- --pull
|
||||
dockerfile: Dockerfile
|
||||
goarch: arm
|
||||
goarm: "7"
|
||||
goos: linux
|
||||
image_templates:
|
||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v7'
|
||||
skip_push: false
|
||||
use: buildx
|
||||
|
||||
- build_flag_templates:
|
||||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||
- --label=org.opencontainers.image.source={{ .GitURL }}
|
||||
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
||||
- --platform=linux/arm64
|
||||
- --pull
|
||||
dockerfile: Dockerfile
|
||||
goarch: arm64
|
||||
goos: linux
|
||||
image_templates:
|
||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm64'
|
||||
skip_push: false
|
||||
use: buildx
|
||||
|
||||
docker_manifests:
|
||||
- name_template: 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}'
|
||||
image_templates:
|
||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-amd64'
|
||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v6'
|
||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v7'
|
||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm64'
|
||||
|
||||
gitea_urls:
|
||||
api: https://git.cryptic.systems/api/v1
|
||||
download: https://git.cryptic.systems
|
||||
|
||||
version: 2
|
4
Makefile
4
Makefile
@ -17,8 +17,8 @@ ${EXECUTABLE}:
|
||||
|
||||
# TEST
|
||||
# ==============================================================================
|
||||
PHONY+=test
|
||||
test: clean ${EXECUTABLE}
|
||||
PHONY+=test/unit
|
||||
test/unit: clean ${EXECUTABLE}
|
||||
go test -v ./pkg/...
|
||||
|
||||
# CLEAN
|
||||
|
@ -1,7 +1,5 @@
|
||||
# dyndns-client
|
||||
|
||||
[](https://drone.cryptic.systems/volker.raschek/dyndns-client)
|
||||
|
||||
dyndns-client is a Daemon to listen on interface notifications produced by the linux
|
||||
kernel of a client machine to update one or more DNS zones.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user