File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 28
28
29
29
outputs :
30
30
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 }}
33
33
34
34
steps :
35
35
49
49
username : ${{ github.actor }}
50
50
password : ${{ secrets.GITHUB_TOKEN }}
51
51
52
+ - name : Install jq
53
+ if : inputs.architecture == 'arm64'
54
+ run : pip install jq
55
+
52
56
- name : Read and flatten build variables
53
57
id : build_vars
54
58
# Example output:
80
84
id : build
81
85
uses : docker/bake-action@v4
82
86
with :
83
- push : false
87
+ push : true
84
88
load : true
85
89
# Using provenance to disable default attestation so it will build only desired images:
86
90
# https://github.com/orgs/community/discussions/45969
96
100
cat docker-bake-template-meta.json \
97
101
| jq -c '.target | [to_entries[] | {"key": (.key|split("-")[:-1] | join("-")), "value": [.value.tags[]][1]}] | from_entries' \
98
102
| 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}"
Original file line number Diff line number Diff line change 26
26
arm-build :
27
27
uses : ./.github/workflows/docker-build-upload.yml
28
28
with :
29
- architecture : amd64
29
+ architecture : arm64
30
30
runsOn : ARM64
Original file line number Diff line number Diff line change 1
- docker
2
1
requests
3
2
pre-commit
4
3
pytest ~= 7.0
5
4
pytest-docker
6
5
doit
7
6
dunamai
8
- jq
You can’t perform that action at this time.
0 commit comments