Comments (8)
Seems also related to docker/buildx#756
from bake-action.
Hey @crazy-max or @justincormack , do you maybe have any idea on what could cause this? I'm pretty lost, since it seems to work locally, but not in GH Actions 🤔
from bake-action.
Ok, I realized that buildx bake
does not work with multiple JSON files in addition to the HCL file, so I went ahead and added a step merging the JSON files and then I just use the merged output file in conjunction with the HCL file.
- name: Merge Metadata Bake Definitions
run: |
INPUT=(${{ steps.meta-k3d-binary.outputs.bake-file }} ${{ steps.meta-k3d-dind.outputs.bake-file }} ${{ steps.meta-k3d-proxy.outputs.bake-file }} ${{ steps.meta-k3d-tools.outputs.bake-file }})
OUT_FILE=./bake-metadata.json
OUT_FILE_TMP=./bake-metadata-tmp.json
cat << EOF > $OUT_FILE
{
"target": {}
}
EOF
for file in "${INPUT[@]}"; do
cat $OUT_FILE > $OUT_FILE_TMP
jq -s '.[0] * .[1]' $OUT_FILE_TMP $file > $OUT_FILE
done
rm "$OUT_FILE_TMP"
from bake-action.
@iwilltry42 Sorry I completely missed your issue! I will take a look and try to repro on my side. Keep you in touch.
from bake-action.
No worries @crazy-max , it works with the workaround of merging the metadata json files first before passing them to the bake-action 👍
I also confirmed this with buildx CLI locally, so I guess it would have to go to the buildx repo in any case.
from bake-action.
@iwilltry42 I've made a small experiment with your use case and indeed there is an issue using the bake definition returned by the metadata action. Using an HCL definition works: https://github.com/crazy-max/buildx-buildkit-tests/tree/main/bake-action-61. Not sure if it's a limitation of the JSON definition or a wrong implementation of it. Keep you in touch.
from bake-action.
Ah that's interesting 🤔
If it'd be a limitation of using the JSON definition, it may be nice to have a switch for bake --print
to output HCL instead of JSON (though I guess adding support for multiple JSON inputs probably ends up to be the same amount of effort in buildx).
Thank you for looking into this!
from bake-action.
Thanks for the fix guys! 🙏
from bake-action.
Related Issues (20)
- Builds not using local cache HOT 1
- feature: perform push iff all targets succeed HOT 4
- Q: Proper bake usage withh groups HOT 5
- Additional Metadata Output specifying images generated HOT 1
- v3 breaks build for *.output=type=docker,dest HOT 3
- Action does not respect the Builder mirror configuration HOT 2
- Too large metadata cause " Argument list too long" error HOT 3
- Everything after # gets eaten in the `set` input, with no way to escape it since v3 HOT 3
- Closed connection while exporting cache HOT 1
- Multi level image builds - only base image is cached HOT 5
- Add bake metadata JSON output
- Building on multiple native nodes HOT 6
- Feature Request: Ability to specify working-directory HOT 3
- How to access the bake-action cached image in subsequent steps? HOT 7
- cache-from and to gha not fully working for me HOT 8
- How to access the bake-action cached image in subsequent jobs? HOT 1
- Caching images for use in docker compose between jobs and runs. HOT 3
- Cache not being hit when using TAG workflows HOT 5
- Feat: output grouped digest HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bake-action.