Skip to content

Commit b2a95a4

Browse files
committed
ci: Drop tags input for docker/build-push-action
The `tags` input is unused for caching.
1 parent 122014e commit b2a95a4

File tree

2 files changed

+8
-31
lines changed

2 files changed

+8
-31
lines changed

.github/actions/run-in-docker-action/action.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ inputs:
44
dockerfile:
55
description: 'A Dockerfile that defines an image'
66
required: true
7-
tag:
8-
description: 'A tag of an image'
9-
required: true
107
scope:
118
description: 'A cached image scope'
129
required: false
@@ -26,7 +23,6 @@ runs:
2623
with:
2724
context: .
2825
file: ${{ inputs.dockerfile }}
29-
tags: ${{ inputs.tag }}
3026
load: true
3127
cache-from: type=gha,scope=${{ inputs.scope }}
3228

@@ -36,7 +32,6 @@ runs:
3632
with:
3733
context: .
3834
file: ${{ inputs.dockerfile }}
39-
tags: ${{ inputs.tag }}
4035
load: true
4136
cache-from: type=gha,scope=${{ inputs.scope }}
4237

@@ -51,7 +46,8 @@ runs:
5146
$(echo '${{ toJSON(env) }}' | jq -r 'keys[] | "--env \(.) "') \
5247
--volume ${{ github.workspace }}:${{ github.workspace }} \
5348
--workdir ${{ github.workspace }} \
54-
${{ inputs.tag }} bash -c "
49+
$(docker images -q | head -n1) \
50+
bash -c "
5551
git config --global --add safe.directory ${{ github.workspace }}
5652
${{ inputs.command }}
5753
"

.github/workflows/ci.yml

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ jobs:
7070
uses: docker/build-push-action@v5
7171
with:
7272
file: ./ci/linux-debian.Dockerfile
73-
tags: ${{ matrix.arch }}-debian-image
7473
cache-from: type=gha,scope=${{ runner.arch }}
7574
cache-to: type=gha,scope=${{ runner.arch }},mode=min
7675

@@ -116,7 +115,6 @@ jobs:
116115
uses: ./.github/actions/run-in-docker-action
117116
with:
118117
dockerfile: ./ci/linux-debian.Dockerfile
119-
tag: x64-debian-image
120118

121119
- name: Print logs
122120
uses: ./.github/actions/print-logs
@@ -152,7 +150,6 @@ jobs:
152150
uses: ./.github/actions/run-in-docker-action
153151
with:
154152
dockerfile: ./ci/linux-debian.Dockerfile
155-
tag: x64-debian-image
156153

157154
- name: Print logs
158155
uses: ./.github/actions/print-logs
@@ -184,7 +181,6 @@ jobs:
184181
uses: ./.github/actions/run-in-docker-action
185182
with:
186183
dockerfile: ./ci/linux-debian.Dockerfile
187-
tag: x64-debian-image
188184

189185
- name: Print logs
190186
uses: ./.github/actions/print-logs
@@ -225,7 +221,6 @@ jobs:
225221
uses: ./.github/actions/run-in-docker-action
226222
with:
227223
dockerfile: ./ci/linux-debian.Dockerfile
228-
tag: x64-debian-image
229224

230225
- name: Print logs
231226
uses: ./.github/actions/print-logs
@@ -265,7 +260,6 @@ jobs:
265260
uses: ./.github/actions/run-in-docker-action
266261
with:
267262
dockerfile: ./ci/linux-debian.Dockerfile
268-
tag: arm64-debian-image
269263

270264
- name: Print logs
271265
uses: ./.github/actions/print-logs
@@ -297,7 +291,6 @@ jobs:
297291
uses: ./.github/actions/run-in-docker-action
298292
with:
299293
dockerfile: ./ci/linux-debian.Dockerfile
300-
tag: x64-debian-image
301294

302295
- name: Print logs
303296
uses: ./.github/actions/print-logs
@@ -313,28 +306,22 @@ jobs:
313306
fail-fast: false
314307
matrix:
315308
include:
316-
- docker_arch: x64
317-
runner: ubuntu-latest
309+
- runner: ubuntu-latest
318310
binary_arch: x64
319311
env_vars: { CC: 'clang', ASM: 'auto' }
320-
- docker_arch: x64
321-
runner: ubuntu-latest
312+
- runner: ubuntu-latest
322313
binary_arch: i686
323314
env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' }
324-
- docker_arch: arm64
325-
runner: ubuntu-24.04-arm
315+
- runner: ubuntu-24.04-arm
326316
binary_arch: arm64
327317
env_vars: { CC: 'clang', ASM: 'auto' }
328-
- docker_arch: x64
329-
runner: ubuntu-latest
318+
- runner: ubuntu-latest
330319
binary_arch: x64
331320
env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
332-
- docker_arch: x64
333-
runner: ubuntu-latest
321+
- runner: ubuntu-latest
334322
binary_arch: i686
335323
env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
336-
- docker_arch: arm64
337-
runner: ubuntu-24.04-arm
324+
- runner: ubuntu-24.04-arm
338325
binary_arch: arm64
339326
env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
340327

@@ -360,7 +347,6 @@ jobs:
360347
uses: ./.github/actions/run-in-docker-action
361348
with:
362349
dockerfile: ./ci/linux-debian.Dockerfile
363-
tag: ${{ matrix.docker_arch }}-debian-image
364350

365351
- name: Print logs
366352
uses: ./.github/actions/print-logs
@@ -404,7 +390,6 @@ jobs:
404390
uses: ./.github/actions/run-in-docker-action
405391
with:
406392
dockerfile: ./ci/linux-debian.Dockerfile
407-
tag: x64-debian-image
408393

409394
- name: Print logs
410395
uses: ./.github/actions/print-logs
@@ -455,7 +440,6 @@ jobs:
455440
uses: ./.github/actions/run-in-docker-action
456441
with:
457442
dockerfile: ./ci/linux-debian.Dockerfile
458-
tag: x64-debian-image
459443

460444
- name: Print logs
461445
uses: ./.github/actions/print-logs
@@ -498,7 +482,6 @@ jobs:
498482
uses: ./.github/actions/run-in-docker-action
499483
with:
500484
dockerfile: ./ci/linux-debian.Dockerfile
501-
tag: x64-debian-image
502485

503486
- name: Print logs
504487
uses: ./.github/actions/print-logs
@@ -714,7 +697,6 @@ jobs:
714697
uses: ./.github/actions/run-in-docker-action
715698
with:
716699
dockerfile: ./ci/linux-debian.Dockerfile
717-
tag: x64-debian-image
718700

719701
- name: Print logs
720702
uses: ./.github/actions/print-logs
@@ -733,7 +715,6 @@ jobs:
733715
uses: ./.github/actions/run-in-docker-action
734716
with:
735717
dockerfile: ./ci/linux-debian.Dockerfile
736-
tag: x64-debian-image
737718
command: |
738719
g++ -Werror include/*.h
739720
clang -Werror -x c++-header include/*.h

0 commit comments

Comments
 (0)