25 Commits

Author SHA1 Message Date
9daff6ab62 chore(deps): rollback oras-project/oras to 1.3.1
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 27s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m8s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 20s
Release / Release application (push) Successful in 4m27s
Release / Upload Images to docker.io (push) Successful in 2m27s
2026-05-03 21:54:05 +02:00
0a145a3ec3 docs(README): add badge from ArtifactHub
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 28s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Markdown files / Run markdown linter (push) Successful in 5s
Update Docker Hub Description / update-description-on-hub-docker-io (push) Successful in 5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m8s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 23s
2026-05-03 21:42:51 +02:00
3b20706462 fix(icons): init
Some checks failed
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 28s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Markdown files / Run markdown linter (push) Successful in 5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Has been cancelled
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Has been cancelled
2026-05-03 21:42:08 +02:00
e0083e3d4d fix(ci): disable fail constraint
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 30s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Markdown files / Run markdown linter (push) Successful in 5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m7s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 21s
Release / Release application (push) Successful in 6m46s
Release / Upload Images to docker.io (push) Successful in 1m56s
2026-05-03 21:05:29 +02:00
172d8c072b fix(cmd): add nosec for example
Some checks failed
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 27s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Failing after 7s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m7s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Failing after 17s
2026-05-03 20:53:21 +02:00
8eb0f89d9c fix(Makefile): extract coverage
Some checks failed
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 29s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Failing after 6s
Lint Markdown files / Run markdown linter (push) Successful in 5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m10s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Failing after 17s
2026-05-03 20:49:09 +02:00
afb92e9704 feat: ArtifactHub integration
Some checks failed
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 49s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Failing after 8s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 2m0s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Failing after 18s
2026-05-03 20:42:36 +02:00
0b31b9d21b fix(ci): avoid docker's pull rate limit
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 14s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 35s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 21s
2026-04-21 15:48:14 +02:00
cb1e193e2e Merge pull request 'chore(deps): update module github.com/lib/pq to v1.12.3' (#224) from renovate/go-modules into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 13s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 34s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 20s
2026-04-21 09:08:23 +00:00
9d1a1b4d01 chore(deps): update module github.com/lib/pq to v1.12.3
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 54s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 10s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 13s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 7s
Lint Markdown files / Run markdown linter (pull_request) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 2m21s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 29s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 35s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 20s
2026-04-21 09:04:28 +00:00
be69ca10fb Merge pull request 'chore(deps): update goreleaser/goreleaser-action action to v7.1.0' (#222) from renovate/actions into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 12s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 6s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 31s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 22s
2026-04-20 10:09:44 +00:00
37683f49e4 chore(deps): update goreleaser/goreleaser-action action to v7.1.0
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 23s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 13s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 6s
Lint Markdown files / Run markdown linter (pull_request) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 1m6s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 29s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 20s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 19s
2026-04-20 10:04:09 +00:00
9a911c977e Merge pull request 'chore(deps): update dependency goreleaser/goreleaser to v2.15.3' (#221) from renovate/actions into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 12s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 37s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 26s
2026-04-15 01:08:39 +00:00
9253a3c388 chore(deps): update dependency goreleaser/goreleaser to v2.15.3
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 12s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 12s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 8s
Lint Markdown files / Run markdown linter (pull_request) Successful in 5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 47s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 23s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 39s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 22s
2026-04-15 01:02:28 +00:00
e38db64fc3 Merge pull request 'chore(deps): update actions' (#220) from renovate/actions into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 12s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 44s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 27s
2026-04-14 11:57:07 +00:00
c90c00f000 chore(deps): update actions
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 52s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 19s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 17s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 14s
Lint Markdown files / Run markdown linter (pull_request) Successful in 13s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 3m31s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 47s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 48s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 31s
2026-04-14 10:54:45 +00:00
1cd2dc2798 Merge pull request 'chore(deps): update dependency goreleaser/goreleaser to v2.14.3' (#219) from renovate/actions into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 25s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m6s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 20s
2026-03-09 17:11:20 +00:00
5e7846a753 chore(deps): update dependency goreleaser/goreleaser to v2.14.3
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 26s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 28s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 8s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 8s
Lint Markdown files / Run markdown linter (pull_request) Successful in 6s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 1m4s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 20s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 19s
2026-03-09 17:06:00 +00:00
ef5b0b900b Merge pull request 'chore(deps): update docker/setup-qemu-action action to v4' (#216) from renovate/docker-setup-qemu-action-4.x into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 25s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m4s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 19s
2026-03-09 10:25:04 +00:00
b08c57d533 chore(deps): update docker/setup-qemu-action action to v4
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m4s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 20s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 1m3s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 20s
Lint Markdown files / Run markdown linter (pull_request) Successful in 9s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 24s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 24s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 7s
2026-03-09 07:40:03 +00:00
3d8b3ae802 Merge pull request 'chore(deps): update docker/login-action action to v4' (#217) from renovate/docker-login-action-4.x into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m6s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 21s
Lint Markdown files / Run markdown linter (push) Successful in 10s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 25s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
2026-03-09 07:39:43 +00:00
552903929b chore(deps): update docker/login-action action to v4
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 25s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 25s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 7s
Lint Markdown files / Run markdown linter (pull_request) Successful in 5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m4s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 20s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 1m3s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 20s
2026-03-08 08:02:42 +00:00
baadcacb54 Merge pull request 'chore(deps): update dependency goreleaser/goreleaser to v2.14.2' (#218) from renovate/actions into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 25s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Markdown files / Run markdown linter (push) Successful in 5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m4s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 19s
2026-03-08 05:09:02 +00:00
3dee240d99 chore(deps): update dependency goreleaser/goreleaser to v2.14.2
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 43s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 25s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 7s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Markdown files / Run markdown linter (pull_request) Successful in 5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 1m57s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m6s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 20s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 20s
2026-03-08 05:02:50 +00:00
7c1e6e7b68 Merge pull request 'chore(deps): update goreleaser/goreleaser-action action to v7' (#212) from renovate/goreleaser-goreleaser-action-7.x into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 11s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 32s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 21s
2026-02-26 15:09:27 +00:00
16 changed files with 428 additions and 138 deletions

View File

@@ -0,0 +1,53 @@
name: Upload ArtifactHub Metadata
on:
schedule:
- cron: '0 3 1 * *'
workflow_dispatch:
jobs:
upload-metadata:
name: "Upload artifacthub-repo.yml to OCI registry"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- uses: docker/login-action@v4.1.0
with:
registry: ${{ github.server_url }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
- uses: docker/login-action@v4.1.0
with:
username: ${{ secrets.DOCKER_IO_USERNAME }}
password: ${{ secrets.DOCKER_IO_PASSWORD }}
- uses: oras-project/setup-oras@v2.0.0
with:
version: 1.3.1 # renovate: datasource=github-tags depName=oras-project/oras extractVersion='^v?(?<version>.*)$'
- name: Push artifacthub-repo.yml to git.cryptic.systems
run: |
oras push git.cryptic.systems/volker.raschek/db-wait:artifacthub.io \
--config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \
artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml
- name: Push public cosign key to git.cryptic.systems
env:
COSIGN_PUBLIC_KEY: ${{ vars.COSIGN_PUBLIC_KEY }}
run: |
echo "${COSIGN_PUBLIC_KEY}" > cosign.pub
oras push git.cryptic.systems/volker.raschek/db-wait:cosign.pub \
--artifact-type application/vnd.dev.cosign.public-key.v1 \
--annotation org.opencontainers.image.title=cosign.pub \
cosign.pub:application/vnd.dev.cosign.public-key.v1
- name: Push artifacthub-repo.yml to docker.io
run: |
oras push docker.io/volkerraschek/db-wait:artifacthub.io \
--config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \
artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml
- name: Push public cosign key to docker.io
env:
COSIGN_PUBLIC_KEY: ${{ vars.COSIGN_PUBLIC_KEY }}
run: |
echo "${COSIGN_PUBLIC_KEY}" > cosign.pub
oras push docker.io/volkerraschek/db-wait:cosign.pub \
--artifact-type application/vnd.dev.cosign.public-key.v1 \
cosign.pub:application/vnd.dev.cosign.public-key.v1

View File

@@ -21,7 +21,7 @@ jobs:
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-go@v6.3.0
- uses: actions/setup-go@v6.4.0
with:
go-version: ${{ matrix.go }}
- uses: golangci/golangci-lint-action@v9.2.0

View File

@@ -34,9 +34,24 @@ jobs:
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-go@v6.3.0
- uses: actions/setup-go@v6.4.0
with:
go-version: ${{ matrix.go }}
- env:
GOPROXY: ${{ vars.GOPROXY }}
run: make test/unit
- id: coverage
name: Check coverage
run: |
coverage="$(make test/coverage | grep total | awk '{ print substr($3, 1, length($3)-1); }')"
echo "total_coverage=$coverage" >> $GITHUB_OUTPUT
echo "Total coverage: ${coverage}%"
# - name: Fail if coverage is to low
# run: |
# threshold=50
# total_coverage=${{ steps.coverage.outputs.total_coverage }}
# if (( ${total_coverage%.*} < ${threshold} )); then
# echo "ERROR: Coverage (${total_coverage}%) is below the threshold (${threshold}%)." 1>&2
# exit 1
# fi

View File

@@ -13,25 +13,52 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- uses: docker/setup-qemu-action@v3.7.0
- uses: actions/setup-go@v6.3.0
with:
fetch-depth: 0
- name: Install curl
run: apt-get update && apt-get install --yes curl
- name: Install syft
env:
SYFT_VERSION: "1.44.0" # renovate: datasource=github-releases depName=anchore/syft
run: |
OS="$(uname | tr '[:upper:]' '[:lower:]')"
ARCH="$(dpkg --print-architecture)"
curl \
--fail \
--location \
--silent \
--output syft_${SYFT_VERSION}_${OS}_${ARCH}.deb \
"https://github.com/anchore/syft/releases/download/v${SYFT_VERSION}/syft_${SYFT_VERSION}_${OS}_${ARCH}.deb"
dpkg -i syft_${SYFT_VERSION}_${OS}_${ARCH}.deb
rm syft_${SYFT_VERSION}_${OS}_${ARCH}.deb
- uses: volker-raschek/cosign-installer@v4.1.2-rc3
with:
cosign-release: "v3.0.6" # renovate: datasource=github-tags depName=sigstore/cosign
- uses: docker/setup-qemu-action@v4.0.0
with:
image: harbor.cryptic.systems/docker/tonistiigi/binfmt:latest
- uses: docker/setup-buildx-action@v4.0.0
- uses: actions/setup-go@v6.4.0
with:
go-version: stable
- uses: docker/login-action@v3.7.0
- uses: docker/login-action@v4.1.0
with:
registry: git.cryptic.systems
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
- env:
COSIGN_PASSPHRASE: ${{ secrets.COSIGN_PASSPHRASE }}
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
GITEA_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
GONOSUMDB: ${{ vars.GONOSUMDB }}
GOPROXY: ${{ vars.GOPROXY }}
uses: goreleaser/goreleaser-action@v7.0.0
uses: goreleaser/goreleaser-action@v7.2.1
with:
version: v2.14.1 # renovate: datasource=github-releases depName=goreleaser/goreleaser
version: v2.15.4 # renovate: datasource=github-releases depName=goreleaser/goreleaser
args: release --clean
sync-to-hub-docker-io:
name: "Upload Images to docker.io"
needs:
- release
runs-on: ubuntu-latest
@@ -47,6 +74,6 @@ jobs:
--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 \
--src-username ${{ github.repository_owner }} \
docker://git.cryptic.systems/volker.raschek/db-wait:${TAG} \
docker://docker.io/volkerraschek/db-wait:${TAG}

View File

@@ -1,4 +1,4 @@
name: Update Docker Hub Description
name: "Update Docker Hub Description"
on:
push:
@@ -8,8 +8,7 @@ on:
jobs:
update-description-on-hub-docker-io:
runs-on:
- ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- uses: peter-evans/dockerhub-description@v5.0.0
@@ -17,4 +16,4 @@ jobs:
username: ${{ secrets.DOCKER_IO_USERNAME }}
password: ${{ secrets.DOCKER_IO_PASSWORD }}
repository: volkerraschek/db-wait
readme-filepath: README.md
readme-filepath: README.md

5
.gitignore vendored
View File

@@ -1,3 +1,4 @@
db-wait
coverage.txt
dist
cosign.*
coverage.*
dist

View File

@@ -1,7 +1,17 @@
project_name: db-wait
archives:
- formats: [ "tar.xz" ]
- id: archives
formats:
- tar.xz
name_template: >-
{{ .ProjectName }}-
{{- .Version }}-
{{- .Os }}-
{{- if eq .Arch "amd64" }}amd64
{{- else if eq .Arch "amd64_v1" }}amd64
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}-{{ .Arm }}{{ end }}
files:
- README.md
- LICENSE
@@ -11,15 +21,9 @@ before:
- 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 }}
- id: db-wait
main: main.go
binary: db-wait
env:
- CGO_ENABLED=0
- GONOSUMDB={{ .Env.GONOSUMDB }}
@@ -32,17 +36,19 @@ builds:
- arm64
- riscv64
goarm:
- "5"
- "6"
- "7"
flags:
- -trimpath
- -mod=readonly
- -modcacherw
ldflags:
- -s -w -X 'main.version={{ trimprefix .Tag "v" }}'
- -s -w -X 'main.version={{ .Version }}'
changelog:
filters:
exclude:
- '^chore'
- '^docs'
- '^test'
- Merge pull request
@@ -56,117 +62,304 @@ changelog:
- title: "Bug fixes"
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: Dependencies
regexp: '^.*?chore\(deps\):.+$'
order: 2
- 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
dockers_v2:
- # ID of the image, needed if you want to filter by it later on (e.g. on custom publishers).
# Default: project name
id: container-images
- 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
# Path to the Dockerfile (from the project root).
dockerfile: Dockerfile.scratch
- 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
# IDs to filter the binaries/packages.
#
# Make sure to only include the IDs of binaries you want to `COPY` in your
# Dockerfile.
#
# If you include IDs that don't exist or are not available for the current
# architecture being built, the build of the image will be skipped.
ids:
- db-wait
- 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
# Annotations to be added to the image.
annotations:
org.opencontainers.image.authors: "Volker Raschek"
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.description: "{{ .ProjectName }}"
org.opencontainers.image.documentation: "{{ .ProjectName }}"
org.opencontainers.image.licenses: "MIT"
org.opencontainers.image.revision: "{{ .FullCommit }}"
org.opencontainers.image.source: "{{ .GitURL }}"
org.opencontainers.image.title: "{{ .ProjectName }}"
org.opencontainers.image.url: "https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}"
org.opencontainers.image.vendor: "Volker Raschek"
org.opencontainers.image.version: "{{ .Version }}"
- 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/riscv64
- --pull
dockerfile: Dockerfile
goarch: riscv64
goos: linux
image_templates:
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-riscv64'
skip_push: false
use: buildx
io.artifacthub.package.alternative-locations: "docker.io/volkerraschek/{{ .ProjectName }}:{{ .Version }}"
io.artifacthub.package.keywords: "docker,docker-compose,merge,ci"
io.artifacthub.package.logo-url: "https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}/raw/tag/v{{ .Version }}/icons/icon.png"
io.artifacthub.package.license: "MIT"
io.artifacthub.package.readme-url: "https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}/raw/tag/v{{ .Version }}/README.md"
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'
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-riscv64'
labels: {}
images:
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}'
# Platforms to build.
platforms:
- linux/amd64
- linux/arm/v5
- linux/arm/v6
- linux/arm/v7
- linux/arm64
- linux/riscv64
# Whether to create and attach a SBOM to the image.
sbom: "{{ not .IsNightly }}"
# Tag names.
#
# Empty tags are ignored.
tags:
- "{{ .Version }}"
- "{{ if .IsNightly }}nightly{{ end }}"
- "{{ if not .IsNightly }}latest{{ end }}"
# RPM packages
nfpms:
- id: nfpms
ids:
- db-wait
package_name: db-wait
file_name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{- if .Arm }}-{{ .Arm }}{{ end }}"
vendor: "Volker Raschek"
homepage: "https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}"
maintainer: "Volker Raschek <volker.raschek@cryptic.systems>"
description: |-
db-wait is a tool to merge docker-compose files from multiple resources.
It supports merging local files and remote files via HTTP/HTTPS.
license: MIT
formats:
- deb
- rpm
dependencies:
- git
recommends:
- docker-compose
suggests:
- docker
bindir: /usr/bin
contents:
- src: ./README.md
dst: "/usr/share/doc/{{ .ProjectName }}/README.md"
file_info:
mode: 0644
# License
- src: ./LICENSE
dst: "/usr/share/doc/{{ .ProjectName }}/LICENSE"
file_info:
mode: 0644
- src: ./LICENSE
dst: "/usr/share/licenses/{{ .ProjectName }}/LICENSE"
file_info:
mode: 0644
# Create man page directory
- dst: /usr/share/man/man1
type: dir
file_info:
mode: 0755
rpm:
group: Development/Tools
summary: Tool to merge docker-compose files from multiple resources
compression: xz
deb:
lintian_overrides:
- statically-linked-binary
- changelog-file-missing-in-native-package
sboms:
- # ID of the sbom config, must be unique.
#
# Default: 'default'.
id: sboms-cyclonedx
# IDs of the artifacts to catalog.
#
# If `artifacts` is "source" or "any" then this fields has no effect.
ids:
- db-wait
# Which artifacts to catalog.
#
# Valid options are:
# - any: let the SBOM tool decide which artifacts available in
# the cwd should be cataloged
# - source: source archive
# - package: Linux packages (deb, rpm, apk, etc)
# - installer: Windows MSI installers (Pro only)
# - diskimage: macOS DMG disk images (Pro only)
# - archive: archives from archive pipe
# - binary: binaries output from the build stage
#
# Default: 'archive'.
artifacts: binary
# List of names of the SBOM documents created at this step
# (relative to the dist dir).
#
# Each element configured is made available as variables. For example:
# documents: ["foo", "bar"]
#
# would make the following variables that can be referenced as template keys:
# document0: "foo"
# document1: "bar"
#
# Note that multiple sbom values are only allowed if the value of
# "artifacts" is "any".
#
# Default:
# When "binary": ["{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.sbom.json"]
# When "any": []
# Otherwise: ["{{ .ArtifactName }}.sbom.json"]
# Templates: allowed.
documents:
- "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{- if .Arm }}-{{ .Arm }}{{ end }}.cdx.json"
# Path to the SBOM generator command
#
# Note: the process CWD will be set to the same location as "dist"
#
# Default: 'syft'.
cmd: syft
# Command line arguments for the command
#
# Default: ["$artifact", "--output", "spdx-json=$document", "--enrich", "all"].
# Templates: allowed.
args:
- "$artifact"
- "--enrich=all"
- "--output=cyclonedx-json=$document"
- # ID of the sbom config, must be unique.
#
# Default: 'default'.
id: sboms-spdx
# IDs of the artifacts to catalog.
#
# If `artifacts` is "source" or "any" then this fields has no effect.
ids:
- db-wait
# Which artifacts to catalog.
#
# Valid options are:
# - any: let the SBOM tool decide which artifacts available in
# the cwd should be cataloged
# - source: source archive
# - package: Linux packages (deb, rpm, apk, etc)
# - installer: Windows MSI installers (Pro only)
# - diskimage: macOS DMG disk images (Pro only)
# - archive: archives from archive pipe
# - binary: binaries output from the build stage
#
# Default: 'archive'.
artifacts: binary
# List of names of the SBOM documents created at this step
# (relative to the dist dir).
#
# Each element configured is made available as variables. For example:
# documents: ["foo", "bar"]
#
# would make the following variables that can be referenced as template keys:
# document0: "foo"
# document1: "bar"
#
# Note that multiple sbom values are only allowed if the value of
# "artifacts" is "any".
#
# Default:
# When "binary": ["{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.sbom.json"]
# When "any": []
# Otherwise: ["{{ .ArtifactName }}.sbom.json"]
# Templates: allowed.
documents:
- "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{- if .Arm }}-{{ .Arm }}{{ end }}.spdx.json"
# Path to the SBOM generator command
#
# Note: the process CWD will be set to the same location as "dist"
#
# Default: 'syft'.
cmd: syft
# Command line arguments for the command
#
# Default: ["$artifact", "--output", "spdx-json=$document", "--enrich", "all"].
# Templates: allowed.
args:
- "$artifact"
- "--enrich=all"
- "--output=spdx-json=$document"
docker_signs:
- # ID of the sign config, must be unique.
# Only relevant if you want to produce some sort of signature file.
#
# Default: 'default'.
id: container-images
# Path to the signature command.
#
# Default: 'cosign'.
cmd: cosign
# Command line arguments for the command.
#
# Default: ["sign", "--key=cosign.key", "${artifact}@${digest}", "--yes"].
# Templates: allowed.
# Note: Using --registry-referrers-mode=legacy ensures signature is stored as sha256-<digest>.sig tag
# which is required by ArtifactHub to display the "Signed" badge
args:
- "sign"
- "--key=env://COSIGN_PRIVATE_KEY"
- "--yes"
- "${artifact}@${digest}"
# Which artifacts to sign.
#
# all: all artifacts
# none: no signing
# images: only docker images
# manifests: only docker manifests
# '': images built by dockers_v2
#
# Default: ''.
artifacts: manifests
# IDs of the artifacts to sign.
ids:
- container-images
# Stdin data to be given to the signature command as stdin.
#
# Templates: allowed.
stdin: "{{ .Env.COSIGN_PASSPHRASE }}"
# StdinFile file to be given to the signature command as stdin.
# stdin_file: ./passphrase.key
output: true
gitea_urls:
api: https://git.cryptic.systems/api/v1

View File

@@ -1,5 +0,0 @@
FROM scratch
COPY db-wait-* /usr/bin/db-wait
ENTRYPOINT [ "/usr/bin/db-wait" ]

4
Dockerfile.scratch Normal file
View File

@@ -0,0 +1,4 @@
FROM scratch AS build
ARG TARGETPLATFORM
COPY "${TARGETPLATFORM}/db-wait" "/usr/bin/db-wait"
ENTRYPOINT [ "/usr/bin/db-wait" ]

View File

@@ -49,10 +49,10 @@ test/integration:
go test -v -p 1 -count=1 -timeout 1200s ./it/...
PHONY+=test/coverage
test/coverage: test/unit
test/coverage:
CGO_ENABLED=0 \
GOPROXY=$(shell go env GOPROXY) \
go tool cover -html=coverage.txt
go tool cover -func=coverage.txt
# GOLANGCI-LINT
# ==============================================================================
@@ -111,4 +111,4 @@ container-image/push:
# ==============================================================================
# Declare the contents of the PHONY variable as phony. We keep that information
# in a variable so we can use it in if_changed.
.PHONY: ${PHONY}
.PHONY: ${PHONY}

View File

@@ -1,5 +1,6 @@
# db-wait
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/db-wait)](https://artifacthub.io/packages/search?repo=db-wait)
[![Docker Pulls](https://img.shields.io/docker/pulls/volkerraschek/db-wait)](https://hub.docker.com/r/volkerraschek/db-wait)
With `db-wait` is it possible to wait in CI/CD environments until a database connection can be established and SQL

1
artifacthub-repo.yml Normal file
View File

@@ -0,0 +1 @@
repositoryID: dda4c445-18c8-4fe2-991a-f15ebcf93f84

View File

@@ -14,6 +14,7 @@ func Execute(version string) error {
Short: "Tool to wait until a connection to a database can be established",
Args: cobra.ExactArgs(1),
RunE: rootRunE,
//#nosec G101
Long: `Wait until a database connection can be established and returns a zero exit code if successfully
# Wait until oracle database is ready to establish connections

2
go.mod
View File

@@ -3,7 +3,7 @@ module git.cryptic.systems/volker.raschek/db-wait
go 1.24
require (
github.com/lib/pq v1.11.2
github.com/lib/pq v1.12.3
github.com/sijms/go-ora/v2 v2.9.0
github.com/spf13/cobra v1.10.2
)

4
go.sum
View File

@@ -1,8 +1,8 @@
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/lib/pq v1.11.2 h1:x6gxUeu39V0BHZiugWe8LXZYZ+Utk7hSJGThs8sdzfs=
github.com/lib/pq v1.11.2/go.mod h1:/p+8NSbOcwzAEI7wiMXFlgydTwcgTr3OSKMsD2BitpA=
github.com/lib/pq v1.12.3 h1:tTWxr2YLKwIvK90ZXEw8GP7UFHtcbTtty8zsI+YjrfQ=
github.com/lib/pq v1.12.3/go.mod h1:/p+8NSbOcwzAEI7wiMXFlgydTwcgTr3OSKMsD2BitpA=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sijms/go-ora/v2 v2.9.0 h1:+iQbUeTeCOFMb5BsOMgUhV8KWyrv9yjKpcK4x7+MFrg=
github.com/sijms/go-ora/v2 v2.9.0/go.mod h1:QgFInVi3ZWyqAiJwzBQA+nbKYKH77tdp1PYoCqhR2dU=

BIN
icons/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB