Skip to content

Commit 2ff73d0

Browse files
Binh Nguyenclaude
andcommitted
feat: streamline GitHub Actions for x86_64 and s390x Docker builds only
Major changes: - Created simplified publish workflow for x86_64 + s390x platforms only - Removed ARM, AARCH64, Darwin, and Windows builds - Configure Docker images to publish only to GHCR (ghcr.io/dnse-tech/vector) - Removed S3, Homebrew, and RPM/DEB publishing - focus on Docker only Workflow updates: - Added publish-simplified.yml with streamlined build pipeline - Updated release.yml, nightly.yml, custom_builds.yml to use simplified workflow - Modified cross.yml to test only x86_64 and s390x targets Testing infrastructure: - Added act configuration (.actrc) for local GitHub Actions testing - Created test scripts for local workflow validation - Added comprehensive ACT_TESTING.md documentation - Included event files for act testing scenarios This configuration builds multi-arch Docker images supporting: - linux/amd64 (x86_64) - linux/s390x 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent df507f2 commit 2ff73d0

12 files changed

Lines changed: 542 additions & 9 deletions

.actrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Act configuration for Vector s390x builds
2+
# Default runner image for Linux
3+
-P ubuntu-latest=catthehacker/ubuntu:act-latest
4+
-P ubuntu-24.04=catthehacker/ubuntu:act-24.04
5+
-P release-builder-linux=catthehacker/ubuntu:act-24.04
6+
7+
# Use Docker as container tool
8+
--container-daemon-socket /var/run/docker.sock
9+
10+
# Enable verbose output for debugging
11+
--verbose
12+
13+
# Set default event type
14+
--eventpath .github/workflows/event.json

.github/workflows/cross.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ jobs:
1818
target:
1919
- x86_64-unknown-linux-gnu
2020
- x86_64-unknown-linux-musl
21-
- aarch64-unknown-linux-gnu
22-
- aarch64-unknown-linux-musl
23-
- armv7-unknown-linux-gnueabihf
24-
- armv7-unknown-linux-musleabihf
25-
- arm-unknown-linux-gnueabi
26-
- arm-unknown-linux-musleabi
2721
- s390x-unknown-linux-gnu
22+
# Commented out ARM/AARCH64 targets - not needed
23+
# - aarch64-unknown-linux-gnu
24+
# - aarch64-unknown-linux-musl
25+
# - armv7-unknown-linux-gnueabihf
26+
# - armv7-unknown-linux-musleabihf
27+
# - arm-unknown-linux-gnueabi
28+
# - arm-unknown-linux-musleabi
2829
steps:
2930
- name: (PR review) Set latest commit status as pending
3031
if: ${{ github.event_name == 'pull_request_review' }}

.github/workflows/custom_builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
Custom:
12-
uses: ./.github/workflows/publish.yml
12+
uses: ./.github/workflows/publish-simplified.yml
1313
with:
1414
git_ref: ${{ github.ref }}
1515
channel: custom

.github/workflows/event.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"inputs": {
3+
"git_ref": "refs/heads/s390x/v0.47.0",
4+
"channel": "custom"
5+
}
6+
}

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
Nightly:
14-
uses: ./.github/workflows/publish.yml
14+
uses: ./.github/workflows/publish-simplified.yml
1515
with:
1616
git_ref: ${{ github.ref }}
1717
channel: nightly
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
name: Publish Simplified
2+
3+
permissions:
4+
contents: write
5+
packages: write
6+
7+
on:
8+
workflow_call:
9+
inputs:
10+
git_ref:
11+
type: string
12+
required: true
13+
channel:
14+
type: string
15+
required: true
16+
17+
env:
18+
VERBOSE: true
19+
CI: true
20+
DISABLE_MOLD: true
21+
DEBIAN_FRONTEND: noninteractive
22+
CONTAINER_TOOL: docker
23+
CARGO_PROFILE_RELEASE_LTO: fat
24+
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1
25+
CARGO_NET_GIT_FETCH_WITH_CLI: true
26+
CHANNEL: ${{ inputs.channel }}
27+
28+
jobs:
29+
generate-publish-metadata:
30+
name: Generate Publish-related Metadata
31+
runs-on: ubuntu-24.04
32+
timeout-minutes: 5
33+
outputs:
34+
vector_version: ${{ steps.generate-publish-metadata.outputs.vector_version }}
35+
vector_build_desc: ${{ steps.generate-publish-metadata.outputs.vector_build_desc }}
36+
vector_release_channel: ${{ steps.generate-publish-metadata.outputs.vector_release_channel }}
37+
steps:
38+
- name: Checkout Vector
39+
uses: actions/checkout@v4
40+
with:
41+
ref: ${{ inputs.git_ref }}
42+
- name: Generate publish metadata
43+
id: generate-publish-metadata
44+
run: make ci-generate-publish-metadata
45+
46+
build-x86_64-unknown-linux-musl-packages:
47+
name: Build Vector for x86_64-unknown-linux-musl (.tar.gz)
48+
runs-on: ubuntu-24.04
49+
timeout-minutes: 120
50+
needs: generate-publish-metadata
51+
env:
52+
VECTOR_VERSION: ${{ needs.generate-publish-metadata.outputs.vector_version }}
53+
VECTOR_BUILD_DESC: ${{ needs.generate-publish-metadata.outputs.vector_build_desc }}
54+
CHANNEL: ${{ needs.generate-publish-metadata.outputs.vector_release_channel }}
55+
steps:
56+
- name: Checkout Vector
57+
uses: actions/checkout@v4
58+
with:
59+
ref: ${{ inputs.git_ref }}
60+
- name: Bootstrap runner environment (Ubuntu-specific)
61+
run: sudo -E bash scripts/environment/bootstrap-ubuntu-24.04.sh
62+
- name: Bootstrap runner environment (generic)
63+
run: bash scripts/environment/prepare.sh
64+
- name: Build Vector
65+
run: make package-x86_64-unknown-linux-musl
66+
- name: Stage package artifacts for publish
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: vector-${{ env.VECTOR_VERSION }}-x86_64-unknown-linux-musl
70+
path: target/artifacts/vector*
71+
72+
build-x86_64-unknown-linux-gnu-packages:
73+
name: Build Vector for x86_64-unknown-linux-gnu (.tar.gz)
74+
runs-on: ubuntu-24.04
75+
needs: generate-publish-metadata
76+
timeout-minutes: 120
77+
env:
78+
VECTOR_VERSION: ${{ needs.generate-publish-metadata.outputs.vector_version }}
79+
VECTOR_BUILD_DESC: ${{ needs.generate-publish-metadata.outputs.vector_build_desc }}
80+
CHANNEL: ${{ needs.generate-publish-metadata.outputs.vector_release_channel }}
81+
steps:
82+
- name: Checkout Vector
83+
uses: actions/checkout@v4
84+
with:
85+
ref: ${{ inputs.git_ref }}
86+
- name: Bootstrap runner environment (Ubuntu-specific)
87+
run: sudo -E bash scripts/environment/bootstrap-ubuntu-24.04.sh
88+
- name: Bootstrap runner environment (generic)
89+
run: bash scripts/environment/prepare.sh
90+
- name: Build Vector
91+
run: make package-x86_64-unknown-linux-gnu
92+
- name: Stage package artifacts for publish
93+
uses: actions/upload-artifact@v4
94+
with:
95+
name: vector-${{ env.VECTOR_VERSION }}-x86_64-unknown-linux-gnu
96+
path: target/artifacts/vector*
97+
98+
build-s390x-unknown-linux-gnu-packages:
99+
name: Build Vector for s390x-unknown-linux-gnu (.tar.gz)
100+
runs-on: ubuntu-24.04
101+
timeout-minutes: 120
102+
needs: generate-publish-metadata
103+
env:
104+
VECTOR_VERSION: ${{ needs.generate-publish-metadata.outputs.vector_version }}
105+
VECTOR_BUILD_DESC: ${{ needs.generate-publish-metadata.outputs.vector_build_desc }}
106+
CHANNEL: ${{ needs.generate-publish-metadata.outputs.vector_release_channel }}
107+
steps:
108+
- name: Checkout Vector
109+
uses: actions/checkout@v4
110+
with:
111+
ref: ${{ inputs.git_ref }}
112+
- name: Bootstrap runner environment (Ubuntu-specific)
113+
run: sudo -E bash scripts/environment/bootstrap-ubuntu-24.04.sh
114+
- name: Bootstrap runner environment (generic)
115+
run: bash scripts/environment/prepare.sh
116+
- name: Build Vector
117+
env:
118+
DOCKER_PRIVILEGED: "true"
119+
run: make package-s390x-unknown-linux-gnu
120+
- name: Stage package artifacts for publish
121+
uses: actions/upload-artifact@v4
122+
with:
123+
name: vector-${{ env.VECTOR_VERSION }}-s390x-unknown-linux-gnu
124+
path: target/artifacts/vector*
125+
126+
publish-docker-ghcr:
127+
name: Publish to GHCR
128+
runs-on: ubuntu-24.04
129+
timeout-minutes: 15
130+
needs:
131+
- generate-publish-metadata
132+
- build-x86_64-unknown-linux-gnu-packages
133+
- build-x86_64-unknown-linux-musl-packages
134+
- build-s390x-unknown-linux-gnu-packages
135+
env:
136+
VECTOR_VERSION: ${{ needs.generate-publish-metadata.outputs.vector_version }}
137+
VECTOR_BUILD_DESC: ${{ needs.generate-publish-metadata.outputs.vector_build_desc }}
138+
CHANNEL: ${{ needs.generate-publish-metadata.outputs.vector_release_channel }}
139+
steps:
140+
- name: Checkout Vector
141+
uses: actions/checkout@v4
142+
with:
143+
ref: ${{ inputs.git_ref }}
144+
- name: Login to GitHub Container Registry
145+
uses: docker/login-action@v3
146+
with:
147+
registry: ghcr.io
148+
username: ${{ github.actor }}
149+
password: ${{ secrets.GITHUB_TOKEN }}
150+
- name: Set up QEMU
151+
uses: docker/setup-qemu-action@v3.6.0
152+
with:
153+
platforms: linux/amd64,linux/s390x
154+
- name: Set up Docker Buildx
155+
id: buildx
156+
uses: docker/setup-buildx-action@v3.10.0
157+
with:
158+
version: latest
159+
install: true
160+
- name: Download staged package artifacts (x86_64-unknown-linux-gnu)
161+
uses: actions/download-artifact@v4
162+
with:
163+
name: vector-${{ env.VECTOR_VERSION }}-x86_64-unknown-linux-gnu
164+
path: target/artifacts
165+
- name: Download staged package artifacts (x86_64-unknown-linux-musl)
166+
uses: actions/download-artifact@v4
167+
with:
168+
name: vector-${{ env.VECTOR_VERSION }}-x86_64-unknown-linux-musl
169+
path: target/artifacts
170+
- name: Download staged package artifacts (s390x-unknown-linux-gnu)
171+
uses: actions/download-artifact@v4
172+
with:
173+
name: vector-${{ env.VECTOR_VERSION }}-s390x-unknown-linux-gnu
174+
path: target/artifacts
175+
- name: Build and publish Docker images
176+
env:
177+
PLATFORM: "linux/amd64,linux/s390x"
178+
# Publish to GHCR under your org
179+
REPOS: "ghcr.io/dnse-tech/vector"
180+
uses: nick-fields/retry@v3
181+
with:
182+
timeout_minutes: 15
183+
max_attempts: 3
184+
retry_wait_seconds: 60
185+
command: make release-docker

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
Release:
15-
uses: ./.github/workflows/publish.yml
15+
uses: ./.github/workflows/publish-simplified.yml
1616
with:
1717
git_ref: ${{ github.ref }}
1818
channel: release

0 commit comments

Comments
 (0)