Skip to content

Commit ddd32c3

Browse files
ci: fix pinact usage
Signed-off-by: Patrick Stephens <pat@telemetryforge.io>
1 parent 9def659 commit ddd32c3

6 files changed

Lines changed: 27 additions & 22 deletions

File tree

.github/workflows/AGENTS.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ These labels on a PR enable additional jobs in `pr-build.yaml`:
3939
| `build-windows` | Builds Windows packages |
4040
| `build-macos` | Builds macOS packages |
4141
| `build-packages` | Builds all packages (linux + windows + macos) |
42-
| `build-self-hosted` | Uses self-hosted runners instead of Namespace runners |
4342

4443
## Composite Actions
4544

@@ -145,15 +144,14 @@ env:
145144
LINUX_AMD_RUNNER: ${{ vars.LINUX_AMD_RUNNER || 'namespace-profile-ubuntu-latest' }}
146145
LINUX_AMD_LARGE_RUNNER: ${{ vars.LINUX_AMD_LARGE_RUNNER || 'namespace-profile-ubuntu-latest-4cpu-16gb' }}
147146
LINUX_ARM_RUNNER: ${{ vars.LINUX_ARM_RUNNER || 'namespace-profile-ubuntu-latest-arm' }}
147+
LINUX_S390X_RUNNER: ${{ vars.LINUX_S390X_RUNNER || 'ubuntu-24.04-s390x' }}
148148
```
149149

150150
Then reference them in jobs:
151151
```yaml
152152
runs-on: ${{ env.LINUX_AMD_RUNNER }}
153153
```
154154

155-
The `self-ubuntu-latest` label for self-hosted runners is always referenced as a literal string (it is not configurable via repo variables).
156-
157155
**Note:** Keep runner label selection local to reusable (`call-*`) workflows to avoid caller/reusable propagation issues.
158156

159157
## Build Configuration

.github/workflows/README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ The main CI/CD pipeline is split across three workflow files based on trigger co
165165
2. **build-image** - Builds multi-architecture container images (UBI and Debian-based)
166166
3. **build-linux** - Builds Linux packages for all release targets
167167
4. **build-windows** - Builds Windows packages
168-
5. **build-macos** - Builds macOS packages (currently disabled with `if: false`)
168+
5. **build-macos** - Builds macOS packages
169169
6. **test-containers** - Runs container tests including BATS and Kubernetes tests
170170
7. **test-packages** - Tests Linux packages on target distributions
171171
8. **staging-upload** - Signs packages (via `sign-packages` action) and uploads to GCS staging
@@ -187,7 +187,7 @@ The main CI/CD pipeline is split across three workflow files based on trigger co
187187
2. **build-image** - Builds multi-architecture container images (UBI and Debian-based)
188188
3. **build-linux** - Builds Linux packages for all release targets
189189
4. **build-windows** - Builds Windows packages
190-
5. **build-macos** - Builds macOS packages (currently disabled with `if: false`)
190+
5. **build-macos** - Builds macOS packages
191191
6. **copy-common-images** - Promotes release images to standard locations
192192
7. **release** - Creates GitHub release with signed artefacts, SBOMs, and uploads to GCS
193193
8. **update-docs** - Updates documentation with new version mappings
@@ -333,7 +333,7 @@ The main CI/CD pipeline is split across three workflow files based on trigger co
333333

334334
- Automatic tag creation based on schedule
335335
- Different versioning for LTS (25.10.x) and mainline (vYY.M.W)
336-
- Finds last successful "Build and test" workflow run
336+
- Finds last successful "Branch Build and Test" workflow run
337337
- Validates tag doesn't already exist
338338
- Uses PAT to trigger downstream workflows
339339
- Dry-run support for testing
@@ -416,6 +416,8 @@ The main CI/CD pipeline is split across three workflow files based on trigger co
416416
- `linux-targets` - JSON array of Linux build targets (full set for PRs, reduced set for staging/releases)
417417
- `version` - The build version (from Dockerfile or git tag)
418418
- `oss-version` - The OSS (Fluent Bit) version from source/oss_version.txt
419+
- `ubi-image-base` - Canonical UBI image base (`ghcr.io/telemetryforge/agent/ubi`)
420+
- `debian-image-base` - Canonical Debian image base (`ghcr.io/telemetryforge/agent/debian`)
419421

420422
**Usage Examples:**
421423

@@ -471,10 +473,11 @@ get-metadata:
471473

472474
**Jobs:**
473475

474-
1. **build-ubi-single-arch-container-images** - Matrix-calls single-arch builds for UBI across selected platforms
475-
2. **build-debian-single-arch-container-images** - Matrix-calls single-arch builds for Debian across selected platforms
476-
3. **build-ubi-container-image-manifest-and-sign** - Invokes reusable manifest+sign workflow for UBI image
477-
4. **build-debian-container-image-manifest-and-sign** - Invokes reusable manifest+sign workflow for Debian image
476+
1. **resolve-image-bases** - Reuses metadata workflow outputs for canonical UBI and Debian image base names
477+
2. **build-ubi-single-arch-container-images** - Matrix-calls single-arch builds for UBI across selected platforms
478+
3. **build-debian-single-arch-container-images** - Matrix-calls single-arch builds for Debian across selected platforms
479+
4. **build-ubi-container-image-manifest-and-sign** - Invokes reusable manifest+sign workflow for UBI image
480+
5. **build-debian-container-image-manifest-and-sign** - Invokes reusable manifest+sign workflow for Debian image
478481

479482
**Outputs:**
480483

@@ -483,6 +486,7 @@ get-metadata:
483486
**Key Features:**
484487

485488
- Multi-architecture support (AMD64, ARM64, s390x)
489+
- Canonical image base names sourced from metadata outputs
486490
- Separate UBI and Debian build chains so each manifest/sign job depends only on its own image digests
487491
- Explicit per-image manifest/sign calls (no matrix in orchestration layer)
488492
- Image signing with Cosign (key-based and OIDC)
@@ -858,15 +862,15 @@ sequenceDiagram
858862
BranchBuild->>BranchBuild: get-meta (release linux targets)
859863
BranchBuild->>BranchBuild: build-image (default platforms)
860864
BranchBuild->>Registry: Push signed multi-arch images
861-
BranchBuild->>BranchBuild: build-linux + build-windows (+ build-macos if enabled)
865+
BranchBuild->>BranchBuild: build-linux + build-windows + build-macos
862866
BranchBuild->>BranchBuild: test-containers + test-packages
863867
BranchBuild->>BranchBuild: staging-upload (sign packages)
864868
BranchBuild->>GCS: Upload staging artifacts
865869
BranchBuild->>BranchBuild: tests-complete
866870
else Tagged release context
867871
Tag->>RelBuild: Trigger release pipeline
868872
RelBuild->>RelBuild: get-meta (version from tag)
869-
RelBuild->>RelBuild: build-image + build-linux + build-windows (+ build-macos if enabled)
873+
RelBuild->>RelBuild: build-image + build-linux + build-windows + build-macos
870874
RelBuild->>Registry: copy-common-images
871875
RelBuild->>RelBuild: release job (SBOM, schema, tarballs, signing)
872876
RelBuild->>GCS: Upload release artifacts
@@ -880,12 +884,14 @@ sequenceDiagram
880884
sequenceDiagram
881885
participant Caller as Calling Workflow
882886
participant Multi as call-build-containers
887+
participant Meta as call-get-metadata
883888
participant SingleUBI as call-build-container-single-arch (UBI)
884889
participant SingleDeb as call-build-container-single-arch (Debian)
885890
participant PerImage as call-build-container-manifest-and-sign
886891
participant Registry as GHCR
887892
888893
Caller->>Multi: with version/ref/platforms/nightly-build-info
894+
Multi->>Meta: Resolve canonical image base names
889895
890896
par For each UBI platform
891897
Multi->>SingleUBI: Invoke single-arch reusable workflow
@@ -936,15 +942,15 @@ sequenceDiagram
936942
BuildLinux->>Artifacts: Upload package artifacts
937943
Branch->>TestPkgs: Test release linux target matrix
938944
else Tagged release context
939-
Release->>BuildLinux: Build release linux targets
945+
BranchBuild->>BranchBuild: build-linux + build-windows + build-macos
940946
BuildLinux->>Artifacts: Upload package artifacts
941947
Note over Release,TestPkgs: release-build.yaml does not run package tests
942948
end
943949
```
944950

945951
### Auto Release Flow
946952

947-
```mermaid
953+
RelBuild->>RelBuild: build-image + build-linux + build-windows + build-macos
948954
sequenceDiagram
949955
participant Cron as Scheduled Trigger
950956
participant Manual as workflow_dispatch
@@ -1126,7 +1132,6 @@ The workflows support different runner types:
11261132
- `namespace-profile-ubuntu-latest` - Namespace runners (4 vCPU, 8GB RAM)
11271133
- `namespace-profile-ubuntu-latest-4cpu-16gb` - Larger Namespace runners
11281134
- `namespace-profile-ubuntu-latest-arm` - ARM64 Namespace runners
1129-
- `self-ubuntu-latest` - Self-hosted runners (when labeled)
11301135
- `macos-15` - macOS Apple Silicon
11311136
- `macos-15-intel` - macOS Intel
11321137
- `windows-2025` - Windows Server 2025
@@ -1156,7 +1161,6 @@ Required secrets for workflows:
11561161
- `build-linux` - Build Linux packages only
11571162
- `build-windows` - Build Windows packages only
11581163
- `build-macos` - Build macOS packages only
1159-
- `build-self-hosted` - Use self-hosted runners
11601164

11611165
2. **Testing** - All changes should pass:
11621166
- Unit tests with sanitizers

.github/workflows/call-build-containers.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ permissions:
5050
contents: read
5151

5252
jobs:
53-
54-
# Required as reusable workflow calls cannot reference env variables from the calling workflow but can use outputs from dependent jobs.
53+
# Required as reusable workflow calls cannot reference env variables from the calling workflow but can use outputs from dependent jobs.
5554
# Instead we use the call-get-metadata.yaml workflow to resolve the canonical image base names and then pass them to the single-arch build jobs.
5655
resolve-image-bases:
5756
name: Resolve image base names

.github/workflows/call-get-metadata.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ on:
3535
value: ${{ jobs.get-metadata.outputs.oss-version }}
3636
ubi-image-base:
3737
description: The canonical base name for UBI container images.
38-
value: 'ghcr.io/telemetryforge/agent/ubi'
38+
value: "ghcr.io/telemetryforge/agent/ubi"
3939
debian-image-base:
4040
description: The canonical base name for Debian container images.
41-
value: 'ghcr.io/telemetryforge/agent/debian'
41+
value: "ghcr.io/telemetryforge/agent/debian"
4242

4343
env:
4444
# Set once from repo variable or override here for testing

.github/workflows/release-build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
run: mkdir -p output
138138
shell: bash
139139

140-
# Once https://github.com/rhysd/actionlint/issues/693 is resolved we should do these in parallel to speed up the release process.
140+
# Once https://github.com/rhysd/actionlint/issues/693 is resolved we should do these in parallel to speed up the release process.
141141
# For now we do them sequentially to avoid actionlint errors.
142142
- name: Sign packages
143143
# Only sign if at least one package build produced artefacts
@@ -299,7 +299,7 @@ jobs:
299299
pull-requests: write
300300
id-token: write
301301
name: Update documentation on release
302-
uses: telemetryforge/documentation/.github/workflows/call-add-mapping-version.yaml@694143c942c2481eb49ccbaa99f9b6c13d25d84e
302+
uses: telemetryforge/documentation/.github/workflows/call-add-mapping-version.yaml@main
303303
with:
304304
agent-version: ${{ needs.get-meta.outputs.version }}
305305
oss-version: ${{ needs.get-meta.outputs.oss-version }}

.pinact.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ files:
77
- pattern: .github/actions/*/action.yml
88
- pattern: .github/actions/*/action.yaml
99
# Ignore everything else, e.g. actions in vendored libs under source
10+
11+
ignore_actions:
12+
- name: telemetryforge/.*
13+
ref: main

0 commit comments

Comments
 (0)