Skip to content

Commit dc9de81

Browse files
committed
buildx
1 parent 3ee1163 commit dc9de81

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

.github/actions/cli-setup/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ runs:
1616
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
1717
with:
1818
artifact-ids: ${{ inputs.artifact-id }}
19-
path: ${{ runner.temp }/cli
20-
- run: mv ${{ runner.temp }/cli/linkerd2-cli-*-linux-amd64 ${{ inputs.target }}
19+
path: ${{ runner.temp }}/cli
20+
- run: mv ${{ runner.temp }}/cli/linkerd2-cli-*-linux-amd64 ${{ inputs.target }}
2121
shell: bash

.github/workflows/cli-build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,25 @@ on:
88
type: string
99
required: false
1010
default: 'multi-arch'
11+
outputs:
12+
artifact-id:
13+
value: ${{ jobs.build.outputs.artifact-id }}
1114

1215
jobs:
1316
build:
1417
runs-on: ${{ vars.LINKERD2_RUNNER || 'ubuntu-24.04' }}
1518
timeout-minutes: 10
1619
steps:
1720
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
21+
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435
1822
- uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
1923
id: build
2024
with:
21-
build-arg: |
25+
build-args: |
2226
LINKERD_VERSION=${{ inputs.version }}
2327
target: ${{ inputs.target }}
2428
context: .
25-
dockerfile: cli/Dockerfile
29+
file: cli/Dockerfile
2630
cache-from: type=gha,scope=${{ github.ref_name }}-cli
2731
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-cli
2832
push: false

.github/workflows/integration.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ jobs:
133133
- uses: ./.github/actions/cli-setup
134134
with:
135135
artifact-id: ${{ needs.build-cli.outputs.artifact-id }}
136-
- run: bin/tests --images archive --cleanup-docker --name ${{ matrix.test }} "$HOME/linkerd"
136+
target: ${{ runner.temp }}/linkerd
137+
- run: bin/tests --images archive --cleanup-docker --name ${{ matrix.test }} ${{ runner.temp }}/linkerd
137138
env:
138139
LINKERD_DOCKER_REGISTRY: ${{ env.DOCKER_REGISTRY }}
139140
TAG: ${{ needs.meta.outputs.tag }}
@@ -184,6 +185,7 @@ jobs:
184185
- uses: ./.github/actions/cli-setup
185186
with:
186187
artifact-id: ${{ needs.build-cli.outputs.artifact-id }}
188+
target: ${{ runner.temp }}/linkerd
187189
- name: Setup deps
188190
shell: bash
189191
run: |
@@ -205,7 +207,7 @@ jobs:
205207
- run: docker load <image-archives/policy-controller.tar
206208
- run: docker load <image-archives/proxy.tar
207209
- run: docker image ls
208-
- run: just linkerd-tag='${{ needs.meta.outputs.tag }}' linkerd-exec="$HOME/linkerd" linkerd-install
210+
- run: just linkerd-tag='${{ needs.meta.outputs.tag }}' linkerd-exec="${{ runner.temp }}/linkerd" linkerd-install
209211
- name: Load images
210212
run: |
211213
# Image loading is flakey in CI, so retry!
@@ -287,7 +289,8 @@ jobs:
287289
- uses: ./.github/actions/cli-setup
288290
with:
289291
artifact-id: ${{ needs.build-cli.outputs.artifact-id }}
290-
- run: bin/tests --images archive --cleanup-docker --name '${{ matrix.integration_test }}' "$HOME/linkerd"
292+
target: ${{ runner.temp }}/linkerd
293+
- run: bin/tests --images archive --cleanup-docker --name '${{ matrix.integration_test }}' ${{ runner.temp }}/linkerd
291294
env:
292295
LINKERD_DOCKER_REGISTRY: ${{ env.DOCKER_REGISTRY }}
293296

@@ -309,7 +312,8 @@ jobs:
309312
- uses: ./.github/actions/cli-setup
310313
with:
311314
artifact-id: ${{ needs.build-cli.outputs.artifact-id }}
312-
- run: bin/tests --images archive --cleanup-docker --name viz "$HOME/linkerd"
315+
target: ${{ runner.temp }}/linkerd
316+
- run: bin/tests --images archive --cleanup-docker --name viz ${{ runner.temp }}/linkerd
313317
env:
314318
LINKERD_DOCKER_REGISTRY: ${{ env.DOCKER_REGISTRY }}
315319

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ jobs:
7676

7777
cli:
7878
needs: tag
79-
if: needs.meta.outputs.changed == 'true'
8079
uses: ./.github/workflows/cli-build.yml
8180
with:
8281
version: ${{ needs.tag.outputs.tag }}
@@ -140,6 +139,7 @@ jobs:
140139
name: Create GH release
141140
needs:
142141
- tag
142+
- cli
143143
- integration_tests
144144
timeout-minutes: 30
145145
runs-on: ${{ vars.LINKERD2_RUNNER || 'ubuntu-24.04' }}

0 commit comments

Comments
 (0)