You've already forked db-wait
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
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
This commit is contained in:
53
.gitea/workflows/artifacthub-metadata.yaml
Normal file
53
.gitea/workflows/artifacthub-metadata.yaml
Normal 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.2 # 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
|
||||
@@ -40,3 +40,18 @@ jobs:
|
||||
- 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
|
||||
|
||||
@@ -13,9 +13,31 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.2
|
||||
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
|
||||
@@ -25,15 +47,18 @@ jobs:
|
||||
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.1.0
|
||||
uses: goreleaser/goreleaser-action@v7.2.1
|
||||
with:
|
||||
version: v2.15.3 # 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
|
||||
@@ -49,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}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user