Skip to content

Commit daecefc

Browse files
committed
Push!
1 parent 8f090b7 commit daecefc

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

.github/workflows/docker-build-upload.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828

2929
outputs:
3030
build_vars: ${{ steps.build_vars.outputs.vars }}
31-
#targets: ${{ steps.bake_metadata.outputs.targets }}
32-
#images: ${{ steps.bake_metadata.outputs.images }}
31+
targets: ${{ steps.bake_metadata.outputs.targets }}
32+
images: ${{ steps.bake_metadata.outputs.images }}
3333

3434
steps:
3535

@@ -49,6 +49,10 @@ jobs:
4949
username: ${{ github.actor }}
5050
password: ${{ secrets.GITHUB_TOKEN }}
5151

52+
- name: Install jq
53+
if: inputs.architecture == 'arm64'
54+
run: pip install jq
55+
5256
- name: Read and flatten build variables
5357
id: build_vars
5458
# Example output:
@@ -80,7 +84,7 @@ jobs:
8084
id: build
8185
uses: docker/bake-action@v4
8286
with:
83-
push: false
87+
push: true
8488
load: true
8589
# Using provenance to disable default attestation so it will build only desired images:
8690
# https://github.com/orgs/community/discussions/45969
@@ -96,3 +100,8 @@ jobs:
96100
cat docker-bake-template-meta.json \
97101
| jq -c '.target | [to_entries[] | {"key": (.key|split("-")[:-1] | join("-")), "value": [.value.tags[]][1]}] | from_entries' \
98102
| tee bake-meta.json
103+
targets=$(echo $(cat bake-meta.json | jq -c 'keys'))
104+
images=$(echo $(cat bake-meta.json | jq -c '. | [to_entries[] | {"key": (.key| split("-")| join("_") |ascii_upcase + "_IMAGE"), "value": .value}] | from_entries'))
105+
echo -e "targets=$targets\nimages=$images"
106+
echo "targets=$targets" >> "${GITHUB_OUTPUT}"
107+
echo "images=$images" >> "${GITHUB_OUTPUT}"

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ jobs:
2626
arm-build:
2727
uses: ./.github/workflows/docker-build-upload.yml
2828
with:
29-
architecture: amd64
29+
architecture: arm64
3030
runsOn: ARM64

requirements-dev.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
docker
21
requests
32
pre-commit
43
pytest~=7.0
54
pytest-docker
65
doit
76
dunamai
8-
jq

0 commit comments

Comments
 (0)