mirror of
https://github.com/outbackdingo/talos-cloud-controller-manager.git
synced 2026-01-27 10:20:27 +00:00
feat: build latest version
Build and push the latest edge version to the registry. Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
This commit is contained in:
37
.github/workflows/build-edge.yaml
vendored
Normal file
37
.github/workflows/build-edge.yaml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Build edge
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'go.mod'
|
||||
- 'go.sum'
|
||||
- 'cmd/**'
|
||||
- 'pkg/**'
|
||||
|
||||
jobs:
|
||||
build-publish:
|
||||
name: "Build image and publish"
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up docker buildx
|
||||
run: make docker-init
|
||||
- name: Github registry login
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
run: make images
|
||||
env:
|
||||
PUSH: "true"
|
||||
TAG: "edge"
|
||||
2
Makefile
2
Makefile
@@ -7,7 +7,9 @@ PUSH ?= false
|
||||
|
||||
SHA ?= $(shell git describe --match=none --always --abbrev=8 --dirty)
|
||||
TAG ?= $(shell git describe --tag --always --match v[0-9]\*)
|
||||
ifneq ($(TAG),edge)
|
||||
GO_LDFLAGS ?= -ldflags '-X k8s.io/component-base/version.gitVersion=$(TAG)'
|
||||
endif
|
||||
|
||||
OS ?= $(shell go env GOOS)
|
||||
ARCH ?= $(shell go env GOARCH)
|
||||
|
||||
Reference in New Issue
Block a user