Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
robomics committed Feb 2, 2025
1 parent 750bf15 commit 0d4ad84
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/build-cxx-ubuntu-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
name: Generate job matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate-matrix.outputs.result }}
matrix: ${{ steps.generate-matrix.outputs.matrix }}
steps:
- name: Generate matrix
id: generage-matrix
id: generate-matrix
shell: python
run: |
import json
Expand Down Expand Up @@ -185,24 +185,30 @@ jobs:
includes.append(t | {"runner": "ubuntu-24.04", "platform": "linux/amd64"})
includes.append(t | {"runner": "ubuntu-24.04-arm", "platform": "linux/arm64"})
# TODO remove me
includes = includes[-2:]
json.dump(
{"include": includes},
fp=sys.stdout,
indent=2,
sort_keys=True,
)
with open(os.environ.get("GITHUB_OUTPUT"), "a") as f:
for fp in (sys.stdout, f):
print("matrix=", file=f, end="")
json.dump(
{"include": includes},
fp=fp,
indent=2,
fp=f,
sort_keys=True,
)
build-dockerfile:
needs: [matrix-factory]
outputs:
image:
description: "Name of the image built by the workflow"
value: ${{ steps.metadata.outputs.image }}
tag:
description: "Tag for the version of the image built by the workflow"
value: ${{ steps.metadata.outputs.build-date }}
image: ${{ steps.metadata.outputs.image }}
tag: ${{ steps.metadata.outputs.build-date }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix-factory.outputs.matrix) }}
Expand Down Expand Up @@ -271,7 +277,6 @@ jobs:
context: ${{ github.workspace }}
push: true
file: dockerfiles/ubuntu-cxx.Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ matrix.platform }}
outputs: type=image,"name=${{ steps.metadata.outputs.image }}",push-by-digest=true,name-canonical=true,push=true
Expand Down Expand Up @@ -334,6 +339,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
flavor: latest=true
images: ${{ needs.build-dockerfile.outputs.image }}
tags: ${{ needs.build-dockerfile.outputs.tag }}

Expand Down

0 comments on commit 0d4ad84

Please sign in to comment.