File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 build_and_push :
77 runs-on : ubuntu-22.04
88 steps :
9+ - name : " Update Jq"
10+ run : sudo apt-get install --only-upgrade jq
911 - name : Login to Docker Hub
1012 uses : docker/login-action@v3
1113 with :
@@ -15,13 +17,13 @@ jobs:
1517 uses : actions/checkout@v4
1618 - name : " Build images"
1719 run : |
18- buildExpr='map(select(.build == true)).[] | .stages[] as $stage | "docker build \-\ -no-cache \-\ -target \($stage) \ -t \(.namespace)/\(.name):\(.tag)\ -\($stage|ascii_downcase) ./\(.path)" | split("\n") | .[]';
20+ buildExpr='map(select(.build == true)).[] | .stages[] as $stage | "docker build - -no-cache - -target \($stage) -t \(.namespace)/\(.name):\(.tag)-\($stage|ascii_downcase) ./\(.path)" | split("\n") | .[]';
1921 jq -r "$buildExpr" versions.json | while read -r image; do
2022 $($image)
2123 done
2224 - name : " Push Images"
2325 run : |
24- pushExpr='map(select(.build == true and .push == true)).[] | .stages[] as $stage | "docker push \(.namespace)/\(.name):\(.tag)\ -\($stage|ascii_downcase) " | split("\n") | .[]'
26+ pushExpr='map(select(.build == true and .push == true)).[] | .stages[] as $stage | "docker push \(.namespace)/\(.name):\(.tag)-\($stage|ascii_downcase) " | split("\n") | .[]'
2527 jq -r "$pushExpr" versions.json | while read -r image; do
2628 $($image)
2729 done
You can’t perform that action at this time.
0 commit comments