Skip to content

Commit 7ecd881

Browse files
committed
gha: Use workflow_call
[ upstream commit 573e9d5 ] Signed-off-by: Tam Mach <tam.mach@cilium.io>
1 parent 7578276 commit 7ecd881

File tree

2 files changed

+37
-22
lines changed

2 files changed

+37
-22
lines changed

.github/workflows/build-envoy-image-ci.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
timeout-minutes: 360
1919
name: Build and push multi-arch images
2020
runs-on: ubuntu-latest-64-cores-256gb
21+
outputs:
22+
sha: ${{ steps.tag.outputs.sha }}
2123
steps:
2224
- name: Set up QEMU
2325
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
@@ -147,3 +149,16 @@ jobs:
147149
run: |
148150
echo "Digests:"
149151
echo "quay.io/${{ github.repository_owner }}/cilium-envoy-dev:${{ github.event.pull_request.head.sha }}@${{ steps.docker_build_ci.outputs.digest }}"
152+
153+
cilium-intergration-tests:
154+
name: Cilium Integration Tests
155+
needs: build-and-push-prs
156+
permissions:
157+
contents: read
158+
pull-requests: write
159+
statuses: write
160+
uses: ./.github/workflows/cilium-integration-tests.yaml
161+
with:
162+
repository: ${{ github.event.pull_request.head.repo.full_name }}
163+
commit_ref: ${{ github.event.pull_request.head.sha }}
164+
secrets: inherit

.github/workflows/cilium-integration-tests.yaml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
name: Cilium Integration Tests
22
on:
3-
push:
4-
branches:
5-
- v1.32
6-
pull_request_target:
7-
types:
8-
- opened
9-
- reopened
10-
- synchronize
11-
branches:
12-
- v1.32
3+
workflow_call:
4+
inputs:
5+
repository:
6+
description: 'Github Repository to run the workflow on.'
7+
type: string
8+
required: true
9+
default: cilium/proxy
10+
commit_ref:
11+
description: 'Git commit ref for image.'
12+
type: string
13+
required: true
1314

1415
concurrency:
15-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }}
16+
group: ${{ github.workflow }}-${{ inputs.repository || github.event.pull_request.number || github.event.after }}
1617
cancel-in-progress: true
1718

1819
# By specifying the access of one of the scopes, all of those that are not specified are set to 'none'.
@@ -45,11 +46,11 @@ jobs:
4546
echo "PROXY_GITHUB_REPO=github.com/cilium/proxy" >> $GITHUB_ENV
4647
4748
- name: Prepare variables for PR
48-
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
49+
if: inputs.commit_ref != ''
4950
run: |
5051
echo "PROXY_IMAGE=quay.io/cilium/cilium-envoy-dev" >> $GITHUB_ENV
51-
echo "PROXY_TAG=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
52-
echo "PROXY_GITHUB_REPO=github.com/${{github.event.pull_request.head.repo.full_name}}" >> $GITHUB_ENV
52+
echo "PROXY_TAG=${{ inputs.commit_ref }}" >> $GITHUB_ENV
53+
echo "PROXY_GITHUB_REPO=github.com/${{ inputs.repository }}" >> $GITHUB_ENV
5354
5455
- name: Checkout Cilium ${{ env.CILIUM_REPO_REF }}
5556
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -177,11 +178,10 @@ jobs:
177178
shell: bash
178179
run: cilium sysdump --output-filename cilium-sysdump-final
179180

180-
181-
- name: Upload Cilium system dump
182-
if: failure()
183-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
184-
with:
185-
name: cilium-integration-test-sysdumps
186-
path: cilium-sysdump-*.zip
187-
retention-days: 5
181+
- name: Upload Cilium system dump
182+
if: failure()
183+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
184+
with:
185+
name: cilium-integration-test-sysdumps
186+
path: cilium-sysdump-*.zip
187+
retention-days: 5

0 commit comments

Comments
 (0)