Skip to content

Commit 8557aa5

Browse files
committed
switch to gha
1 parent 3d77fca commit 8557aa5

File tree

3 files changed

+129
-0
lines changed

3 files changed

+129
-0
lines changed

.github/workflows/build.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Build
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
mode:
7+
required: true
8+
type: string
9+
description:
10+
mode as expected by `cc-utils/.github/workflows/prepare`
11+
either of
12+
- snapshot
13+
- release
14+
15+
jobs:
16+
prepare:
17+
uses: gardener/cc-utils/.github/workflows/prepare.yaml@master
18+
with:
19+
mode: ${{ inputs.mode }}
20+
21+
lint:
22+
runs-on: ubuntu-latest
23+
needs:
24+
- prepare
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: latest
32+
33+
- name: Install dependencies + run linter
34+
run: |
35+
.ci/lint eslint.sast.config.mjs
36+
37+
docker-image:
38+
name: Build OCI Image
39+
needs:
40+
- prepare
41+
permissions:
42+
contents: read
43+
packages: write
44+
id-token: write
45+
uses: gardener/cc-utils/.github/workflows/oci-ocm.yaml@master
46+
with:
47+
name: delivery-dashboard
48+
version: ${{ needs.prepare.outputs.version }}
49+
oci-registry: ${{ needs.prepare.outputs.oci-registry }}
50+
oci-repository: odg/delivery-dashboard
51+
dockerfile: Dockerfile
52+
ctx: oci-images
53+
oci-platforms: linux/amd64,linux/arm64
54+
ocm-labels: |
55+
name: gardener.cloud/cve-categorisation
56+
value:
57+
network_exposure: public
58+
authentication_enforced: false
59+
user_interaction: end-user
60+
confidentiality_requirement: none
61+
integrity_requirement: high
62+
availability_requirement: high
63+
64+
helmchart:
65+
name: Build Helmchart
66+
needs:
67+
- prepare
68+
- docker-image
69+
permissions:
70+
contents: read
71+
packages: write
72+
id-token: write
73+
uses: gardener/cc-utils/.github/workflows/helmchart-ocm.yaml@master
74+
with:
75+
name: delivery-dashboard
76+
dir: charts/delivery-dashboard
77+
oci-registry: ${{ needs.prepare.outputs.oci-registry }}
78+
oci-repository: charts/odg
79+
ocm-mappings: |
80+
- ref: ocm-resource:delivery-dashboard.repository
81+
attribute: image.repository
82+
- ref: ocm-resource:delivery-dashboard.tag
83+
attribute: image.tag
84+
- ref: ocm-resource:busybox.repository
85+
attribute: busybox.image.repository
86+
- ref: ocm-resource:busybox.tag
87+
attribute: busybox.image.tag
88+

.github/workflows/release.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
7+
jobs:
8+
build:
9+
uses: ./.github/workflows/build.yaml
10+
permissions:
11+
contents: write
12+
packages: write
13+
id-token: write
14+
secrets: inherit
15+
with:
16+
mode: release
17+
18+
release-to-github-and-bump:
19+
uses: gardener/cc-utils/.github/workflows/release.yaml@master
20+
needs: build
21+
permissions:
22+
contents: write
23+
packages: write
24+
id-token: write
25+
secrets: inherit
26+
with:
27+
release-commit-target: branch
28+
next-version: bump-minor
29+

.ocm/base-component.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: ocm.software/ocm-gear/delivery-dashboard
2+
resources:
3+
- name: busybox
4+
version: 1.37.0
5+
type: ociImage
6+
access:
7+
type: ociRegistry
8+
imageReference: docker.io/library/busybox:1.37.0
9+
relation: external
10+
sources: []
11+
componentReferences: []
12+

0 commit comments

Comments
 (0)