chore: add release workflow (#750)
* Regenerate deepcopy * Add the workflow * Stop signing the tag
This commit is contained in:
parent
8fee7f2806
commit
63e96c9715
|
|
@ -0,0 +1,56 @@
|
||||||
|
name: Release Operator
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-release:
|
||||||
|
name: Release Operator, build and push newest image
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up env vars
|
||||||
|
run: |
|
||||||
|
echo "GO111MODULE=on" >> $GITHUB_ENV
|
||||||
|
echo "GO_VERSION=v$(sed -n 's/GO_VERSION=//p' config.base.env)" >> $GITHUB_ENV
|
||||||
|
echo "GOPATH=/home/runner/go" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Prepare go environment
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: ${{ env.GO_VERSION }}
|
||||||
|
|
||||||
|
- name: Ensure Golang runtime dependencies
|
||||||
|
run: make go-dependencies
|
||||||
|
|
||||||
|
- name: Configure Git
|
||||||
|
run: |
|
||||||
|
git config user.name "$GITHUB_ACTOR"
|
||||||
|
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||||
|
|
||||||
|
- name: Tag the release
|
||||||
|
run: make tag
|
||||||
|
|
||||||
|
- name: Set version for release tag name
|
||||||
|
run: |
|
||||||
|
echo "VERSION=$(cat VERSION.txt)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
tag_name: ${{ env.VERSION }}
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push the image to DockerHub
|
||||||
|
run: |
|
||||||
|
git reset --hard
|
||||||
|
make container-runtime-release
|
||||||
2
Makefile
2
Makefile
|
|
@ -398,7 +398,7 @@ bump-version: sembump ## Bump the version in the version file. Set BUMP to [ pat
|
||||||
.PHONY: tag
|
.PHONY: tag
|
||||||
tag: ## Create a new git tag to prepare to build a release
|
tag: ## Create a new git tag to prepare to build a release
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
git tag -s -a $(VERSION) -m "$(VERSION)"
|
git tag -a $(VERSION) -m "$(VERSION)"
|
||||||
git push origin $(VERSION)
|
git push origin $(VERSION)
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ package v1alpha2
|
||||||
|
|
||||||
import (
|
import (
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
rbacv1 "k8s.io/api/rbac/v1"
|
"k8s.io/api/rbac/v1"
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -400,7 +400,7 @@ func (in *JenkinsSpec) DeepCopyInto(out *JenkinsSpec) {
|
||||||
in.ConfigurationAsCode.DeepCopyInto(&out.ConfigurationAsCode)
|
in.ConfigurationAsCode.DeepCopyInto(&out.ConfigurationAsCode)
|
||||||
if in.Roles != nil {
|
if in.Roles != nil {
|
||||||
in, out := &in.Roles, &out.Roles
|
in, out := &in.Roles, &out.Roles
|
||||||
*out = make([]rbacv1.RoleRef, len(*in))
|
*out = make([]v1.RoleRef, len(*in))
|
||||||
copy(*out, *in)
|
copy(*out, *in)
|
||||||
}
|
}
|
||||||
in.ServiceAccount.DeepCopyInto(&out.ServiceAccount)
|
in.ServiceAccount.DeepCopyInto(&out.ServiceAccount)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue