Skip to content

Commit 7b63f25

Browse files
committed
Parameterize buildbot identity and GH_REPO
Lets release workflows be reused unchanged across forks. Buildbot identity (user.name/user.email) now reads from vars.BUILDBOT_NAME / vars.BUILDBOT_EMAIL with the existing pixie-io values as fallbacks. GH_REPO is now propagated from the workflow to cli/cloud build scripts (operator/vizier already passed it), so artifact_utils.sh no longer relies on a fork-specific default. The default chain falls through GITHUB_REPOSITORY (auto-set by Actions) before the pixie-io/pixie literal. Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent 6030ee0 commit 7b63f25

5 files changed

Lines changed: 14 additions & 13 deletions

File tree

‎.github/workflows/cli_release.yaml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
BUILD_NUMBER: ${{ github.run_attempt }}
5555
JOB_NAME: ${{ github.job }}
5656
GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.gcloud-creds.outputs.gcloud-creds }}
57+
GH_REPO: ${{ github.repository }}
5758
shell: bash
5859
run: |
5960
export TAG_NAME="${REF#*/tags/}"
@@ -217,8 +218,8 @@ jobs:
217218
env:
218219
BUILDBOT_GPG_KEY_ID: ${{ secrets.BUILDBOT_GPG_KEY_ID }}
219220
run: |
220-
git config --global user.name 'pixie-io-buildbot'
221-
git config --global user.email 'build@pixielabs.ai'
221+
git config --global user.name "${{ vars.BUILDBOT_NAME || 'pixie-io-buildbot' }}"
222+
git config --global user.email "${{ vars.BUILDBOT_EMAIL || 'build@pixielabs.ai' }}"
222223
git config --global user.signingkey "${BUILDBOT_GPG_KEY_ID}"
223224
git config --global commit.gpgsign true
224225
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0

‎.github/workflows/cloud_release.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.gcloud-creds.outputs.gcloud-creds }}
5151
BUILDBOT_GPG_KEY_ID: ${{ secrets.BUILDBOT_GPG_KEY_ID }}
5252
IMAGE_REPO: ${{ vars.IMAGE_REPO || 'gcr.io/pixie-oss/pixie-prod' }}
53+
GH_REPO: ${{ github.repository }}
5354
shell: bash
5455
run: |
5556
export TAG_NAME="${REF#*/tags/}"
@@ -77,8 +78,7 @@ jobs:
7778
env:
7879
REF: ${{ github.event.ref }}
7980
GH_TOKEN: ${{ secrets.BUILDBOT_GH_API_TOKEN }}
80-
OWNER: pixie-io
81-
REPO: pixie
81+
GH_REPO: ${{ github.repository }}
8282
shell: bash
8383
run: |
8484
export TAG_NAME="${REF#*/tags/}"

‎.github/workflows/operator_release.yaml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ jobs:
128128
env:
129129
GIT_SSH_COMMAND: "ssh -i /tmp/ssh.key"
130130
run: |
131-
git config --global user.name 'pixie-io-buildbot'
132-
git config --global user.email 'build@pixielabs.ai'
131+
git config --global user.name "${{ vars.BUILDBOT_NAME || 'pixie-io-buildbot' }}"
132+
git config --global user.email "${{ vars.BUILDBOT_EMAIL || 'build@pixielabs.ai' }}"
133133
- name: Push Helm YAML to gh-pages
134134
shell: bash
135135
env:
@@ -172,8 +172,8 @@ jobs:
172172
env:
173173
BUILDBOT_GPG_KEY_ID: ${{ secrets.BUILDBOT_GPG_KEY_ID }}
174174
run: |
175-
git config --global user.name 'pixie-io-buildbot'
176-
git config --global user.email 'build@pixielabs.ai'
175+
git config --global user.name "${{ vars.BUILDBOT_NAME || 'pixie-io-buildbot' }}"
176+
git config --global user.email "${{ vars.BUILDBOT_EMAIL || 'build@pixielabs.ai' }}"
177177
git config --global user.signingkey "${BUILDBOT_GPG_KEY_ID}"
178178
git config --global commit.gpgsign true
179179
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0

‎.github/workflows/vizier_release.yaml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ jobs:
135135
env:
136136
GIT_SSH_COMMAND: "ssh -i /tmp/ssh.key"
137137
run: |
138-
git config --global user.name 'pixie-io-buildbot'
139-
git config --global user.email 'build@pixielabs.ai'
138+
git config --global user.name "${{ vars.BUILDBOT_NAME || 'pixie-io-buildbot' }}"
139+
git config --global user.email "${{ vars.BUILDBOT_EMAIL || 'build@pixielabs.ai' }}"
140140
- name: Push Helm YAML to gh-pages
141141
shell: bash
142142
env:
@@ -179,8 +179,8 @@ jobs:
179179
env:
180180
BUILDBOT_GPG_KEY_ID: ${{ secrets.BUILDBOT_GPG_KEY_ID }}
181181
run: |
182-
git config --global user.name 'pixie-io-buildbot'
183-
git config --global user.email 'build@pixielabs.ai'
182+
git config --global user.name "${{ vars.BUILDBOT_NAME || 'pixie-io-buildbot' }}"
183+
git config --global user.email "${{ vars.BUILDBOT_EMAIL || 'build@pixielabs.ai' }}"
184184
git config --global user.signingkey "${BUILDBOT_GPG_KEY_ID}"
185185
git config --global commit.gpgsign true
186186
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0

‎ci/artifact_utils.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# SPDX-License-Identifier: Apache-2.0
1818

1919
gh_artifacts_dir="${ARTIFACTS_DIR}"
20-
gh_repo="${GH_REPO:-pixie-io/pixie}"
20+
gh_repo="${GH_REPO:-${GITHUB_REPOSITORY:-pixie-io/pixie}}"
2121
workspace=$(git rev-parse --show-toplevel)
2222
mirrors_file="${workspace}/ci/artifact_mirrors.yaml"
2323

0 commit comments

Comments
 (0)