Compare commits
1
Commits
master
..
63b7fb4b2d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63b7fb4b2d
|
@@ -10,19 +10,19 @@ jobs:
|
||||
name: "Upload artifacthub-repo.yml to OCI registry"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- uses: docker/login-action@v4.2.0
|
||||
with:
|
||||
registry: ${{ github.server_url }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||
- uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0
|
||||
- uses: docker/login-action@v4.2.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_IO_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_IO_PASSWORD }}
|
||||
- uses: oras-project/setup-oras@1d808f7d7f6995cc68b7bf507bfe5c5446e1dc9d # v2.0.1
|
||||
- uses: oras-project/setup-oras@v2.0.0
|
||||
with:
|
||||
version: 1.3.3 # renovate: datasource=github-tags depName=oras-project/oras extractVersion='^v?(?<version>.*)$'
|
||||
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 \
|
||||
|
||||
@@ -20,10 +20,10 @@ jobs:
|
||||
go: [ stable ]
|
||||
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
|
||||
steps:
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- uses: actions/setup-go@v6.4.0
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
|
||||
- uses: golangci/golangci-lint-action@v9.2.1
|
||||
with:
|
||||
version: v2.12.2 # renovate: datasource=github-releases depName=golangci/golangci-lint
|
||||
|
||||
@@ -33,8 +33,8 @@ jobs:
|
||||
go: [ stable ]
|
||||
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
|
||||
steps:
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- uses: actions/setup-go@v6.4.0
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- env:
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
name: "Run markdown linter"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- uses: DavidAnson/markdownlint-cli2-action@ded1f9488f68a970bc66ea5619e13e9b52e601cd # v23.2.0
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- uses: DavidAnson/markdownlint-cli2-action@v21.0.0
|
||||
with:
|
||||
globs: '**/*.md'
|
||||
|
||||
@@ -12,14 +12,14 @@ jobs:
|
||||
name: "Release application"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- 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.49.0" # renovate: datasource=github-releases depName=anchore/syft
|
||||
SYFT_VERSION: "1.44.0" # renovate: datasource=github-releases depName=anchore/syft
|
||||
run: |
|
||||
OS="$(uname | tr '[:upper:]' '[:lower:]')"
|
||||
ARCH="$(dpkg --print-architecture)"
|
||||
@@ -31,17 +31,17 @@ jobs:
|
||||
"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@7643eed6736a199595ed2a31e9979ec353a88adb # v4.1.3-rc3
|
||||
- uses: volker-raschek/cosign-installer@v4.1.2-rc3
|
||||
with:
|
||||
cosign-release: "v3.1.2" # renovate: datasource=github-tags depName=sigstore/cosign
|
||||
- uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
|
||||
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@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
|
||||
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
||||
- uses: docker/setup-buildx-action@v4.1.0
|
||||
- uses: actions/setup-go@v6.4.0
|
||||
with:
|
||||
go-version: stable
|
||||
- uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0
|
||||
- uses: docker/login-action@v4.2.0
|
||||
with:
|
||||
registry: git.cryptic.systems
|
||||
username: ${{ github.repository_owner }}
|
||||
@@ -52,9 +52,9 @@ jobs:
|
||||
GITEA_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||
GONOSUMDB: ${{ vars.GONOSUMDB }}
|
||||
GOPROXY: ${{ vars.GOPROXY }}
|
||||
uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3
|
||||
uses: goreleaser/goreleaser-action@v7.2.2
|
||||
with:
|
||||
version: v2.17.0 # renovate: datasource=github-releases depName=goreleaser/goreleaser
|
||||
version: v2.16.0 # renovate: datasource=github-releases depName=goreleaser/goreleaser
|
||||
args: release --clean
|
||||
|
||||
sync-to-hub-docker-io:
|
||||
|
||||
@@ -10,8 +10,8 @@ jobs:
|
||||
update-description-on-hub-docker-io:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa # v5.0.0
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- uses: peter-evans/dockerhub-description@v5.0.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_IO_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_IO_PASSWORD }}
|
||||
|
||||
@@ -6,6 +6,21 @@ VERSION?=$(shell git describe --abbrev=0)+hash.$(shell git rev-parse --short HEA
|
||||
DESTDIR?=
|
||||
PREFIX?=/usr/local
|
||||
|
||||
# CONTAINER_RUNTIME
|
||||
# The CONTAINER_RUNTIME variable will be used to specified the path to a
|
||||
# container runtime. This is needed to start and run a container image.
|
||||
CONTAINER_RUNTIME?=$(shell which podman)
|
||||
|
||||
# DB_WAIT_IMAGE_REGISTRY_NAME
|
||||
# Defines the name of the new container to be built using several variables.
|
||||
DB_WAIT_IMAGE_REGISTRY_NAME:=git.cryptic.systems
|
||||
DB_WAIT_IMAGE_REGISTRY_USER:=volker.raschek
|
||||
|
||||
DB_WAIT_IMAGE_NAMESPACE?=${DB_WAIT_IMAGE_REGISTRY_USER}
|
||||
DB_WAIT_IMAGE_NAME:=${EXECUTABLE}
|
||||
DB_WAIT_IMAGE_VERSION?=latest
|
||||
DB_WAIT_IMAGE_FULLY_QUALIFIED=${DB_WAIT_IMAGE_REGISTRY_NAME}/${DB_WAIT_IMAGE_NAMESPACE}/${DB_WAIT_IMAGE_NAME}:${DB_WAIT_IMAGE_VERSION}
|
||||
|
||||
# BIN
|
||||
# ==============================================================================
|
||||
db-wait:
|
||||
@@ -67,6 +82,31 @@ uninstall:
|
||||
${DESTDIR}${PREFIX}/bin/${EXECUTABLE} \
|
||||
${DESTDIR}${PREFIX}/share/licenses/${EXECUTABLE}
|
||||
|
||||
# BUILD CONTAINER IMAGE
|
||||
# ==============================================================================
|
||||
PHONY+=container-image/build
|
||||
container-image/build:
|
||||
${CONTAINER_RUNTIME} build \
|
||||
--build-arg VERSION=${VERSION} \
|
||||
--file Dockerfile \
|
||||
--no-cache \
|
||||
--pull \
|
||||
--tag ${DB_WAIT_IMAGE_FULLY_QUALIFIED} \
|
||||
.
|
||||
|
||||
# DELETE CONTAINER IMAGE
|
||||
# ==============================================================================
|
||||
PHONY:=container-image/delete
|
||||
container-image/delete:
|
||||
- ${CONTAINER_RUNTIME} image rm ${DB_WAIT_IMAGE_FULLY_QUALIFIED}
|
||||
|
||||
# PUSH CONTAINER IMAGE
|
||||
# ==============================================================================
|
||||
PHONY+=container-image/push
|
||||
container-image/push:
|
||||
echo ${DB_WAIT_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${DB_WAIT_IMAGE_REGISTRY_NAME} --username ${DB_WAIT_IMAGE_REGISTRY_USER} --password-stdin
|
||||
${CONTAINER_RUNTIME} push ${DB_WAIT_IMAGE_FULLY_QUALIFIED}
|
||||
|
||||
# PHONY
|
||||
# ==============================================================================
|
||||
# Declare the contents of the PHONY variable as phony. We keep that information
|
||||
|
||||
Reference in New Issue
Block a user