Skip to content

Commit ccb08cf

Browse files
authored
docs: readme & gh workflows updated (#8)
1 parent 7e46b31 commit ccb08cf

File tree

6 files changed

+40
-61
lines changed

6 files changed

+40
-61
lines changed

β€Ž.github/workflows/build_verify.ymlβ€Ž

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
name: Build and Verify
1+
name: "πŸ” OCM: Build & Verify"
2+
3+
run-name: >-
4+
${{ github.event_name == 'workflow_dispatch'
5+
&& format('Manual Package & Verify')
6+
|| format('Automatic Package & Verify') }}
27
38
concurrency:
49
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
510
cancel-in-progress: true
611

712
on:
813
workflow_dispatch: {}
9-
# push:
10-
# branches:
11-
# - main
12-
# paths:
13-
# - "**/helmfile/**"
14-
# - "**/component-constructor.yaml"
1514
pull_request:
1615
branches:
1716
- main
@@ -72,3 +71,4 @@ jobs:
7271
status: ${{ job.status }}
7372
sha: ${{ env.commit }}
7473
targetUrl: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
74+
context: OCM Build & Verify

β€Ž.github/workflows/package_transfer.yamlβ€Ž

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: OCM Package & Transfer
1+
name: "πŸ“¦ OCM: Package, Release & Transfer"
22

33
run-name: >-
44
${{ github.event_name == 'workflow_dispatch'
@@ -16,23 +16,12 @@ on:
1616
description: 'The version to set/publish the OCM packages as. E.g., "1.2.3". If not provided, the version will be auto-incremented based on the latest existing tag.'
1717
required: false
1818
type: string
19-
# To ensure this workflow only runs after successful PR checks via "Build and Verify" workflow, you must:
20-
# - block direct pushes to main by enabling branch protection rules
21-
# - require "Build and Verify" workflow to pass before merging and uncomment the 'push' trigger below.
22-
# This way we can be sure that all changes go through the PR process.
2319
push:
2420
branches:
2521
- main
2622
paths:
2723
- "**/helmfile/**"
2824
- "**/component-constructor.yaml"
29-
# Alternatively, disable the 'push' trigger and use 'workflow_run' to ensure this workflow is triggered by the "Build and Verify" workflow.
30-
# workflow_run:
31-
# workflows: ["Build and Verify"]
32-
# types:
33-
# - completed
34-
# branches:
35-
# - main
3625

3726
permissions:
3827
pull-requests: write

β€Ž.github/workflows/re-find-constructors.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Find Component Constructors
1+
name: πŸ”„ Find Component Constructors
22

33
on:
44
workflow_call:

β€Ž.github/workflows/re-get-version.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Get Version
1+
name: πŸ”„ Get Version
22

33
on:
44
workflow_call:

β€Ž.github/workflows/re-publish-ocm.yamlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish OCM Packages
1+
name: πŸ”„ Publish OCM Packages
22

33
on:
44
workflow_call:

β€ŽREADME.mdβ€Ž

Lines changed: 29 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -167,21 +167,34 @@ flowchart TB
167167

168168

169169
### πŸ”„ Open Component Model Pipeline
170-
A Github Workflow [`.github/workflows/ocm-component-check.yml`](./.github/workflows/ocm-component-check.yml) is used to find, package and transfer all `./ocm/**/component-constructor.yaml` to an an OCI repository.
170+
171+
Two GitHub Workflows manage the OCM component lifecycle:
172+
173+
1. **[πŸ” OCM: Build & Verify](./.github/workflows/build_verify.yml)** - Runs on pull requests to validate OCM components
174+
2. **[πŸ“¦ OCM: Package, Release & Transfer](./.github/workflows/package_transfer.yaml)** - Packages and publishes OCM components on push to main or manual dispatch
175+
176+
These workflows find, package, and transfer all `./ocm/**/component-constructor.yaml` to an OCI repository (ghcr.io).
171177

172178
```mermaid
173179
sequenceDiagram
180+
autonumber
174181
participant Dev as πŸ‘¨β€πŸ’» Developer
175182
participant GH as πŸ™ GitHub
176-
participant GithubWorkflow as βš™οΈ Github Workflow
183+
participant BuildVerify as πŸ” OCM: Build & Verify
184+
participant PackageTransfer as πŸ“¦ OCM: Package, Release & Transfer
185+
participant Version as 🏷️ Version Management
177186
participant OCM as πŸ“¦ OCM
178-
participant JFrog as 🏦 JFrog
179-
180-
Dev->>GH: πŸ“€ Push Code
181-
GH->>GithubWorkflow: πŸš€ Trigger Build
182-
GithubWorkflow->>OCM: πŸ“¦ Create Component
183-
OCM->>JFrog: 🎯 Transfer Artifacts
184-
JFrog-->>Dev: βœ… Build Complete
187+
participant Registry as 🏦 OCI Registry
188+
Dev->>GH: πŸ“€ Push PR
189+
GH->>BuildVerify: πŸš€ Triggers on PR
190+
BuildVerify->>GH: πŸ“¦ Build & Verify
191+
Dev->>GH: πŸ”€ Merge to main
192+
GH->>PackageTransfer: πŸš€ Triggers on push
193+
PackageTransfer->>Version: 🏷️ Get/Bump Version
194+
Version-->>PackageTransfer: βœ… Version Ready
195+
PackageTransfer->>OCM: πŸ“¦ Create & Transfer Components
196+
OCM->>Registry: 🎯 Transfer Artifacts
197+
Registry-->>Dev: βœ… Build Complete
185198
```
186199

187200
### 🧩 Core Components
@@ -224,11 +237,11 @@ sequenceDiagram
224237
```
225238
β”œβ”€β”€ .github/
226239
β”‚ └── workflows/
227-
β”‚ β”œβ”€β”€ build_verify.yml # Build and Verify workflow (runs on PRs)
228-
β”‚ β”œβ”€β”€ package_transfer.yaml # OCM Package & Transfer workflow
229-
β”‚ β”œβ”€β”€ re-find-constructors.yml # Find OCM component constructors
230-
β”‚ β”œβ”€β”€ re-get-version.yml # Version management workflow
231-
β”‚ └── re-publish-ocm.yaml # Publish OCM components workflow
240+
β”‚ β”œβ”€β”€ build_verify.yml # πŸ” OCM: Build & Verify workflow
241+
β”‚ β”œβ”€β”€ package_transfer.yaml # πŸ“¦ OCM: Package, Release & Transfer workflow
242+
β”‚ β”œβ”€β”€ re-find-constructors.yml # πŸ”„ Find Component Constructors workflow
243+
β”‚ β”œβ”€β”€ re-get-version.yml # πŸ”„ Get Version workflow
244+
β”‚ └── re-publish-ocm.yaml # πŸ”„ Publish OCM components workflow
232245
β”œβ”€β”€ README.md # Comprehensive documentation (this file)
233246
β”œβ”€β”€ Makefile # Build and deployment automation
234247
β”œβ”€β”€ renovate.json # Dependency update configuration
@@ -247,38 +260,15 @@ sequenceDiagram
247260

248261
#### πŸ”„ Github Workflows
249262

250-
```mermaid
251-
sequenceDiagram
252-
autonumber
253-
participant Dev as πŸ‘¨β€πŸ’» Developer
254-
participant GH as πŸ™ GitHub
255-
participant BuildVerify as βš™οΈ Build & Verify
256-
participant PackageTransfer as βš™οΈ Package & Transfer
257-
participant Version as 🏷️ Version Management
258-
participant OCM as πŸ“¦ OCM
259-
participant Registry as 🏦 OCI Registry
260-
Dev->>GH: πŸ“€ Push PR
261-
GH->>BuildVerify: πŸš€ Triggers on PR
262-
BuildVerify->>GH: πŸ“¦ Build & Verify
263-
Dev->>GH: πŸ”€ Merge to main
264-
GH->>PackageTransfer: πŸš€ Triggers on push
265-
PackageTransfer->>Version: 🏷️ Get/Bump Version
266-
Version-->>PackageTransfer: βœ… Version Ready
267-
PackageTransfer->>OCM: πŸ“¦ Create & Transfer Components
268-
OCM->>Registry: 🎯 Transfer Artifacts
269-
Registry-->>Dev: βœ… Build Complete
270-
```
271-
272263
##### `build_verify.yml`
273-
The Build and Verify workflow [`.github/workflows/build_verify.yml`](./.github/workflows/build_verify.yml) runs on pull requests and:
264+
The "πŸ” OCM: Build & Verify" workflow [`.github/workflows/build_verify.yml`](./.github/workflows/build_verify.yml) runs on pull requests and:
274265
- Verifies OCM component constructors
275266
- Validates the overall build process
276267

277268
##### `package_transfer.yaml`
278-
The OCM Package & Transfer workflow [`.github/workflows/package_transfer.yaml`](./.github/workflows/package_transfer.yaml) is triggered on pushes to main branch or manual dispatch and:
269+
The "πŸ“¦ OCM: Package, Release & Transfer" workflow [`.github/workflows/package_transfer.yaml`](./.github/workflows/package_transfer.yaml) is triggered on pushes to main branch or manual dispatch and:
279270
- Packages all OCM components defined in `./ocm/**/component-constructor.yaml`
280271
- Transfers components to OCI repository (ghcr.io)
281-
- Publishes ConfigMaps as OCI artifacts
282272

283273
##### `re-find-constructors.yml`
284274
A reusable workflow that scans the repository to find all `component-constructor.yaml` files. This workflow:

0 commit comments

Comments
Β (0)