Skip to content

Commit 86555b3

Browse files
authored
refactor: Move scripts into .scripts folder (#764)
* refactor: Move scripts into .scripts folder * chore: Move enumerate-product-versions Python script * Remove useless cat * Add double quote in create_manifests job * Remove useless cat in build action * Move actionlint config file * Fix double quote on echo command
1 parent 4f4ee65 commit 86555b3

14 files changed

+8
-8
lines changed
File renamed without changes.

.github/actions/build/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ runs:
8585
set -euo pipefail
8686
echo "bake-target-tags: "$(< bake-target-tags)
8787
# Strip the architecture from the version tag
88-
IMAGE_VERSION=$(cat bake-target-tags | cut -d ":" -f 2 | sed -E 's/-(amd64|arm64)$//')
89-
IMAGE_NAME=$(cat bake-target-tags | cut -d ":" -f 1)
88+
IMAGE_VERSION=$(cut -d ":" -f 2 < bake-target-tags | sed -E 's/-(amd64|arm64)$//')
89+
IMAGE_NAME=$(cut -d ":" -f 1 < bake-target-tags)
9090
9191
echo "IMAGE_VERSION=$IMAGE_VERSION" >> $GITHUB_OUTPUT
9292
echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_OUTPUT

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ jobs:
9393
9494
# Push images to image repository
9595
if [ -f bake-target-tags ]; then
96-
echo "bake-target-tags: "$(< bake-target-tags)
97-
IMAGE_NAME=$(cat bake-target-tags | cut -d ":" -f 1)
98-
TAG_NAME=$(cat bake-target-tags | cut -d ":" -f 2)
96+
echo "bake-target-tags: $(< bake-target-tags)"
97+
IMAGE_NAME=$(cut -d ":" -f 1 < bake-target-tags)
98+
TAG_NAME=$(cut -d ":" -f 2 < bake-target-tags)
9999
echo "image: $IMAGE_NAME"
100100
echo "tag: $TAG_NAME"
101101
# Store the output of `docker image push` into a variable, so we can parse it for the digest
@@ -172,7 +172,7 @@ jobs:
172172
DOCKER_USER: github
173173
DOCKER_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
174174
run: |
175-
for product_and_version in $(python3 enumerate-product-versions.py); do
175+
for product_and_version in $(python3 .scripts/enumerate-product-versions.py); do
176176
PRODUCT="$(echo "$product_and_version" | cut -d '#' -f 1)"
177177
VERSION="$(echo "$product_and_version" | cut -d '#' -f 2)"
178178
@@ -185,7 +185,7 @@ jobs:
185185
# Further reading: https://docs.docker.com/reference/cli/docker/manifest/push/
186186
# --amend because the manifest list would be updated since we use the same tag
187187
docker manifest create "$MANIFEST_NAME" --amend "${MANIFEST_NAME}-amd64" --amend "${MANIFEST_NAME}-arm64"
188-
DIGEST=$(docker manifest push $MANIFEST_NAME)
188+
DIGEST=$(docker manifest push "$MANIFEST_NAME")
189189
190190
# Refer to image via its digest (oci.stackable.tech/sdp/airflow@sha256:0a1b2c...)
191191
# This generates a signature and publishes it to the registry, next to the image
@@ -195,6 +195,6 @@ jobs:
195195
# Push to oci.stackable.tech as well
196196
MANIFEST_NAME="oci.stackable.tech/sdp/${PRODUCT}:${VERSION}-stackable${GITHUB_REF_NAME}"
197197
docker manifest create "$MANIFEST_NAME" --amend "${MANIFEST_NAME}-amd64" --amend "${MANIFEST_NAME}-arm64"
198-
DIGEST=$(docker manifest push $MANIFEST_NAME)
198+
DIGEST=$(docker manifest push "$MANIFEST_NAME")
199199
cosign sign -y "$MANIFEST_NAME@$DIGEST"
200200
done
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)