Skip to content

Commit 28cc036

Browse files
committed
ci(actionlint): fix the errors produced by the ActionLint tool
ci test Signed-off-by: ruzell22 <[email protected]>
1 parent 331d6b4 commit 28cc036

24 files changed

+223
-219
lines changed

.github/workflows/.dast-nuclei-cmd-api-server.yaml

+24-22
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,27 @@ jobs:
5252
- name: Create URLs file for Nuclei
5353
run: |
5454
echo https://localhost:4000/ > urls.txt
55-
echo https://localhost:4000/api/v1/api-server/healthcheck >> urls.txt
56-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws >> urls.txt
57-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws >> urls.txt
58-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics >> urls.txt
59-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction >> urls.txt
60-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid >> urls.txt
61-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source >> urls.txt
62-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract >> urls.txt
63-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics >> urls.txt
64-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode >> urls.txt
65-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-balance >> urls.txt
66-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-block >> urls.txt
67-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction >> urls.txt
68-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-transaction >> urls.txt
69-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-past-logs >> urls.txt
70-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract >> urls.txt
71-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/sign-transaction >> urls.txt
72-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics >> urls.txt
73-
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-besu-record >> urls.txt
55+
{
56+
echo https://localhost:4000/api/v1/api-server/healthcheck
57+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws
58+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws
59+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics
60+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction
61+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid
62+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source
63+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract
64+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics
65+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode
66+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-balance
67+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-block
68+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction
69+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-transaction
70+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-past-logs
71+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract
72+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/sign-transaction
73+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics
74+
echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-besu-record
75+
} >> urls.txt
7476
7577
- name: Show file content
7678
run: |
@@ -83,16 +85,16 @@ jobs:
8385

8486
- run: yarn generate-api-server-config
8587

86-
- run: echo "$(jq '.authorizationProtocol = "NONE"' .config.json)" > .config.json
88+
- run: jq '.authorizationProtocol = "NONE"' .config.json > .config2.json && mv .config2.json .config.json
8789

8890
- name: Install Fabric connector into the API server
8991
#Uncomment line 87 when the fix for the cactus-plugin-ledger-connector-fabric has been published to npm and remove live 89
9092
# run: echo "$(jq '.plugins += [{"packageName":"@hyperledger/cactus-plugin-ledger-connector-fabric", "type":"org.hyperledger.cactus.plugin_import_type.LOCAL", "action":"org.hyperledger.cactus.plugin_import_action.INSTALL", "options":{"instanceId":"some-unique-fabric-connector-instance-id", "peerBinary":"/fabric-samples/bin/peer", "connectionProfile":"{}", "dockerBinary":"usr/local/bin/docker","cliContainerEnv":{"CORE_PEER_LOCALMSPID":"Org1MSP","CORE_PEER_ADDRESS":"peer0.org1.example.com:7051","CORE_PEER_MSPCONFIGPATH":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp","CORE_PEER_TLS_ROOTCERT_FILE":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt","ORDERER_TLS_ROOTCERT_FILE":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem"},"discoveryOptions":{"enabled":true,"asLocalhost":true}}}] ' .config.json)" > .config.json
9193
#Line 89 is a workaround for the cactus-plugin-connector-fabric issue
92-
run: echo "$(jq '.plugins += [{"packageName":"@hyperledger/cactus-plugin-ledger-connector-fabric", "type":"org.hyperledger.cactus.plugin_import_type.LOCAL", "action":"org.hyperledger.cactus.plugin_import_action.INSTALL", "options":{ "packageSrc":"/home/runner/work/cacti/cacti/packages/cactus-plugin-ledger-connector-fabric/", "instanceId":"some-unique-fabric-connector-instance-id", "peerBinary":"/fabric-samples/bin/peer", "connectionProfile":"{}", "dockerBinary":"usr/local/bin/docker","cliContainerEnv":{"CORE_PEER_LOCALMSPID":"Org1MSP","CORE_PEER_ADDRESS":"peer0.org1.example.com:7051","CORE_PEER_MSPCONFIGPATH":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp","CORE_PEER_TLS_ROOTCERT_FILE":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt","ORDERER_TLS_ROOTCERT_FILE":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem"},"discoveryOptions":{"enabled":true,"asLocalhost":true}}}] ' .config.json)" > .config.json
94+
run: jq '.plugins += [{"packageName":"@hyperledger/cactus-plugin-ledger-connector-fabric", "type":"org.hyperledger.cactus.plugin_import_type.LOCAL", "action":"org.hyperledger.cactus.plugin_import_action.INSTALL", "options":{ "packageSrc":"/home/runner/work/cacti/cacti/packages/cactus-plugin-ledger-connector-fabric/", "instanceId":"some-unique-fabric-connector-instance-id", "peerBinary":"/fabric-samples/bin/peer", "connectionProfile":"{}", "dockerBinary":"usr/local/bin/docker","cliContainerEnv":{"CORE_PEER_LOCALMSPID":"Org1MSP","CORE_PEER_ADDRESS":"peer0.org1.example.com:7051","CORE_PEER_MSPCONFIGPATH":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp","CORE_PEER_TLS_ROOTCERT_FILE":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt","ORDERER_TLS_ROOTCERT_FILE":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem"},"discoveryOptions":{"enabled":true,"asLocalhost":true}}}] ' .config.json > .config2.json && mv .config2.json .config.json
9395

9496
- name: Install Besu connector into the API server
95-
run: echo "$(jq '.plugins += [{"packageName":"@hyperledger/cactus-plugin-ledger-connector-besu","type":"org.hyperledger.cactus.plugin_import_type.LOCAL","action":"org.hyperledger.cactus.plugin_import_action.INSTALL","options":{"rpcApiHttpHost":"http://localhost:8545", "rpcApiWsHost":"ws://localhost:8546", "instanceId":"some-unique-besu-connector-instance-id"}}]' .config.json)" > .config.json
97+
run: jq '.plugins += [{"packageName":"@hyperledger/cactus-plugin-ledger-connector-besu","type":"org.hyperledger.cactus.plugin_import_type.LOCAL","action":"org.hyperledger.cactus.plugin_import_action.INSTALL","options":{"rpcApiHttpHost":"http://localhost:8545", "rpcApiWsHost":"ws://localhost:8546", "instanceId":"some-unique-besu-connector-instance-id"}}]' .config.json > .config2.json && mv .config2.json .config.json
9698

9799
- name: Run Besu all-in-one image
98100
run: |

.github/workflows/actionlint.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,5 @@ jobs:
6565
echo "actionlint found ${{ steps.actionlint.outputs.total-errors }} errors"
6666
echo "actionlint checked ${{ steps.actionlint.outputs.total-files }} files"
6767
echo "actionlint cache used: ${{ steps.actionlint.outputs.cache-hit }}"
68-
exit ${{ steps.actionlint.outputs.exit-code }}
68+
echo "${{ steps.actionlint.outputs.exit-code }}" >&2
69+
exit 1

.github/workflows/besu-all-in-one-publish.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- uses: actions/[email protected]
3535

3636
- name: Build image
37-
run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
37+
run: docker build "$DOCKER_BUILD_DIR" --file "$DOCKERFILE_PATH" --tag "$IMAGE_NAME" --label "runnumber=${GITHUB_RUN_ID}"
3838

3939
- name: Log in to registry
4040
# This is where you will update the PAT to GITHUB_TOKEN
@@ -45,16 +45,16 @@ jobs:
4545
SHORTHASH=$(git rev-parse --short "$GITHUB_SHA")
4646
TODAYS_DATE="$(date +%F)"
4747
DOCKER_TAG="$TODAYS_DATE-$SHORTHASH"
48-
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
48+
IMAGE_ID="ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME"
4949
# Change all uppercase to lowercase
50-
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
50+
IMAGE_ID=$(echo "$IMAGE_ID" | tr '[:upper:]' '[:lower:]')
5151
# Strip git ref prefix from version
5252
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
5353
# Strip "v" prefix from tag name
54-
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
54+
[[ "${{ github.ref }}" == "refs/tags/*" ]] && VERSION="${VERSION//^v//}"
5555
# Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag
5656
[ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG
57-
echo IMAGE_ID=$IMAGE_ID
58-
echo VERSION=$VERSION
59-
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
60-
docker push $IMAGE_ID:$VERSION
57+
echo IMAGE_ID="$IMAGE_ID"
58+
echo VERSION="$VERSION"
59+
docker tag "$IMAGE_NAME" "$IMAGE_ID:$VERSION"
60+
docker push "$IMAGE_ID:$VERSION"

.github/workflows/cacti-dev-container-vscode-publish.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: npm install -g @devcontainers/[email protected]
4040

4141
- name: npx_yes_devcontainers_cli_build
42-
run: npx --yes @devcontainers/[email protected] build --workspace-folder=./ --log-level=trace --push=false --config=./.devcontainer/devcontainer.json --image-name=$IMAGE_NAME
42+
run: npx --yes @devcontainers/[email protected] build --workspace-folder="./" --log-level=trace --push=false --config="./.devcontainer/devcontainer.json" --image-name="$IMAGE_NAME"
4343

4444
- name: Log in to registry
4545
# This is where you will update the PAT to GITHUB_TOKEN
@@ -50,16 +50,16 @@ jobs:
5050
SHORTHASH=$(git rev-parse --short "$GITHUB_SHA")
5151
TODAYS_DATE="$(date +%F)"
5252
DOCKER_TAG="$TODAYS_DATE-$SHORTHASH"
53-
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
53+
IMAGE_ID="ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME"
5454
# Change all uppercase to lowercase
55-
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
55+
IMAGE_ID=$(echo "$IMAGE_ID" | tr '[:upper:]' '[:lower:]')
5656
# Strip git ref prefix from version
5757
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
5858
# Strip "v" prefix from tag name
59-
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
59+
[[ "${{ github.ref }}" == "refs/tags/*" ]] && VERSION="${VERSION//^v//}"
6060
# Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag
6161
[ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG
62-
echo IMAGE_ID=$IMAGE_ID
63-
echo VERSION=$VERSION
64-
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
65-
docker push $IMAGE_ID:$VERSION
62+
echo IMAGE_ID="$IMAGE_ID"
63+
echo VERSION="$VERSION"
64+
docker tag "$IMAGE_NAME" "$IMAGE_ID:$VERSION"
65+
docker push "$IMAGE_ID:$VERSION"

.github/workflows/ci.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ jobs:
247247
- name: Set env.GIT_INDEX_FILE_COUNT
248248
id: set_env_git_index_file_count
249249
run: |
250-
echo "GIT_INDEX_FILE_COUNT=$(git status --porcelain | wc -l)" >> $GITHUB_ENV
250+
echo "GIT_INDEX_FILE_COUNT=$(git status --porcelain | wc -l)" >> "$GITHUB_ENV"
251251
252252
- name: Print env.GIT_INDEX_FILE_COUNT
253253
id: print_env_git_index_file_count
@@ -1720,7 +1720,7 @@ jobs:
17201720
# - uses: actions/[email protected]
17211721
# - id: yarn-cache-dir-path
17221722
# name: Get yarn cache directory path
1723-
# run: echo "::set-output name=dir::$(yarn cache dir)"
1723+
# run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
17241724
# - id: yarn-cache
17251725
# name: Restore Yarn Cache
17261726
# uses: actions/[email protected]
@@ -1995,7 +1995,7 @@ jobs:
19951995
- uses: actions/[email protected]
19961996
- id: yarn-cache-dir-path
19971997
name: Get yarn cache directory path
1998-
run: echo "::set-output name=dir::$(yarn cache dir)"
1998+
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
19991999
- id: yarn-cache
20002000
name: Restore Yarn Cache
20012001
uses: actions/[email protected]
@@ -2207,7 +2207,7 @@ jobs:
22072207
- name: npm_install_@devcontainers/[email protected]
22082208
run: npm install -g @devcontainers/[email protected]
22092209
- name: npx_yes_devcontainers_cli_build
2210-
run: npx --yes @devcontainers/[email protected] build --workspace-folder=./ --log-level=trace --push=false --config=./.devcontainer/devcontainer.json --image-name=$IMAGE_NAME
2210+
run: npx --yes @devcontainers/[email protected] build --workspace-folder="./" --log-level=trace --push=false --config="./.devcontainer/devcontainer.json" --image-name="$IMAGE_NAME"
22112211
ghcr-example-carbon-accounting:
22122212
runs-on: ubuntu-22.04
22132213
steps:

.github/workflows/cmd-api-server-publish.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- uses: actions/[email protected]
3535

3636
- name: Build image
37-
run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
37+
run: docker build "$DOCKER_BUILD_DIR" --file "$DOCKERFILE_PATH" --tag "$IMAGE_NAME" --label "runnumber=${GITHUB_RUN_ID}"
3838

3939
- name: Log in to registry
4040
# This is where you will update the PAT to GITHUB_TOKEN
@@ -45,16 +45,16 @@ jobs:
4545
SHORTHASH=$(git rev-parse --short "$GITHUB_SHA")
4646
TODAYS_DATE="$(date +%F)"
4747
DOCKER_TAG="$TODAYS_DATE-$SHORTHASH"
48-
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
48+
IMAGE_ID="ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME"
4949
# Change all uppercase to lowercase
50-
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
50+
IMAGE_ID=$(echo "$IMAGE_ID" | tr '[:upper:]' '[:lower:]')
5151
# Strip git ref prefix from version
5252
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
5353
# Strip "v" prefix from tag name
54-
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
54+
[[ "${{ github.ref }}" == "refs/tags/*" ]] && VERSION="${VERSION//^v//}"
5555
# Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag
5656
[ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG
57-
echo IMAGE_ID=$IMAGE_ID
58-
echo VERSION=$VERSION
59-
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
60-
docker push $IMAGE_ID:$VERSION
57+
echo IMAGE_ID="$IMAGE_ID"
58+
echo VERSION="$VERSION"
59+
docker tag "$IMAGE_NAME" "$IMAGE_ID:$VERSION"
60+
docker push "$IMAGE_ID:$VERSION"

.github/workflows/connector-besu-publish.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- uses: actions/[email protected]
3535

3636
- name: Build image
37-
run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
37+
run: docker build "$DOCKER_BUILD_DIR" --file "$DOCKERFILE_PATH" --tag "$IMAGE_NAME" --label "runnumber=${GITHUB_RUN_ID}"
3838

3939
- name: Log in to registry
4040
# This is where you will update the PAT to GITHUB_TOKEN
@@ -45,16 +45,16 @@ jobs:
4545
SHORTHASH=$(git rev-parse --short "$GITHUB_SHA")
4646
TODAYS_DATE="$(date +%F)"
4747
DOCKER_TAG="$TODAYS_DATE-$SHORTHASH"
48-
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
48+
IMAGE_ID="ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME"
4949
# Change all uppercase to lowercase
50-
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
50+
IMAGE_ID=$(echo "$IMAGE_ID" | tr '[:upper:]' '[:lower:]')
5151
# Strip git ref prefix from version
5252
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
5353
# Strip "v" prefix from tag name
54-
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
54+
[[ "${{ github.ref }}" == "refs/tags/*" ]] && VERSION="${VERSION//^v//}"
5555
# Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag
5656
[ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG
57-
echo IMAGE_ID=$IMAGE_ID
58-
echo VERSION=$VERSION
59-
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
60-
docker push $IMAGE_ID:$VERSION
57+
echo IMAGE_ID="$IMAGE_ID"
58+
echo VERSION="$VERSION"
59+
docker tag "$IMAGE_NAME" "$IMAGE_ID:$VERSION"
60+
docker push "$IMAGE_ID:$VERSION"

0 commit comments

Comments
 (0)