fix(ci): add github workflow
This commit is contained in:
parent
3a116c2f34
commit
045a45d4d2
43
.github/dependabot.yml
vendored
Normal file
43
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
version: 2
|
||||||
|
registries:
|
||||||
|
orbis-registry:
|
||||||
|
type: docker-registry
|
||||||
|
url: ${{ secrets.REGISTRY_PULL_HOST }}
|
||||||
|
username: ${{ secrets.REGISTRY_PULL_USER }}
|
||||||
|
password: ${{ secrets.REGISTRY_PULL_PASSWORD }}
|
||||||
|
updates:
|
||||||
|
|
||||||
|
# Maintain dependencies for docker
|
||||||
|
- package-ecosystem: "docker"
|
||||||
|
directory: "/"
|
||||||
|
registries:
|
||||||
|
- orbis-registry
|
||||||
|
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"
|
41
.github/workflows/build-latest.yaml
vendored
Normal file
41
.github/workflows/build-latest.yaml
vendored
Normal 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: install build-essential
|
||||||
|
run:
|
||||||
|
apt update --yes && \
|
||||||
|
apt upgrade --yes && \
|
||||||
|
apt install --yes build-essential
|
||||||
|
- name: set up docker
|
||||||
|
uses: docker-practice/actions-setup-docker@master
|
||||||
|
- name: build
|
||||||
|
run: |
|
||||||
|
make container-image/build/amd64
|
12
Makefile
12
Makefile
@ -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 \
|
||||||
|
Loading…
Reference in New Issue
Block a user