Skip to content

Commit 0f23e36

Browse files
committed
chore: add revision
Signed-off-by: Brad McCoy <[email protected]>
1 parent 93ca264 commit 0f23e36

29 files changed

+22
-6
lines changed

.github/workflows/release-helm-chart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release Charts
22
on:
33
push:
44
branches:
5-
- main
5+
- main1
66
paths:
77
- 'charts/**'
88

.github/workflows/release.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- '[0-9]+.[0-9]+.x'
78

89
permissions:
910
id-token: write
@@ -37,6 +38,10 @@ jobs:
3738
registry: ghcr.io
3839
username: ${{ github.actor }}
3940
password: ${{ env.GITHUB_TOKEN }}
41+
42+
- name: Extract branch name
43+
id: extract_branch
44+
uses: keptn/gh-action-extract-branch-name@main
4045

4146
- name: Prepare
4247
id: prep
@@ -49,6 +54,14 @@ jobs:
4954
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
5055
echo "REVISION=${GITHUB_SHA}" >> $GITHUB_OUTPUT
5156
57+
- name: Get current date and time
58+
id: get_datetime
59+
run: |
60+
DATETIME=$(date +'%Y%m%d%H%M')
61+
BUILD_TIME=$(date -u "+%F_%T")
62+
echo "DATETIME=$DATETIME" >> "$GITHUB_OUTPUT"
63+
echo "BUILD_TIME=$BUILD_TIME" >> "$GITHUB_OUTPUT"
64+
5265
- name: Generate images meta
5366
id: meta
5467
uses: docker/metadata-action@c4ee3adeed93b1fa6a762f209fb01608c1a22f1e
@@ -71,7 +84,10 @@ jobs:
7184
tags: ${{ steps.meta.outputs.tags }}
7285
labels: ${{ steps.meta.outputs.labels }}
7386
build-args: |
74-
REVISION=${{ steps.prep.outputs.REVISION }}
87+
REVISION=${{ steps.prep.outputs.REVISION }}
88+
GIT_HASH=${{ steps.extract_branch.outputs.GIT_SHA }}
89+
RELEASE_VERSION=${{ steps.get_datetime.outputs.DATETIME }}
90+
BUILD_TIME=${{ steps.get_datetime.outputs.BUILD_TIME }}
7591
7692
- name: Sign container image
7793
env:
@@ -80,7 +96,6 @@ jobs:
8096
COSIGN_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
8197
run: |
8298
cosign sign ghcr.io/bradmccoydev/cdevents-controller:latest --yes
83-
cosign sign ghcr.io/bradmccoydev/cdevents-controller:${{ steps.prep.outputs.VERSION }} --yes
8499
85100
# - name: Generate SBOM
86101
# uses: anchore/sbom-action@4d571ad1038a9cc29d676154ef265ab8f9027042 # v0.14.2

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM golang:1.20.4-alpine3.16 AS builder
22

33
ENV CGO_ENABLED=0
4+
ARG REVISION
45
ARG VERSION
56
ARG COMMIT
67
ARG DATE
File renamed without changes.

charts/cdevents-github-controller/Chart.yaml renamed to charts/cdevents-controller/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
2-
version: 0.0.3
3-
appVersion: 0.0.1
2+
version: 0.0.4
3+
appVersion: 0.0.4
44
name: cdevents-controller
55
engine: gotpl
66
description: CDEvents Github Contoller Helm Chart
File renamed without changes.
File renamed without changes.
File renamed without changes.

charts/cdevents-github-controller/templates/certificate.yaml renamed to charts/cdevents-controller/templates/certificate.yaml

File renamed without changes.

0 commit comments

Comments
 (0)