Skip to content

Commit

Permalink
Merge pull request #318 from sohosai/feature/official-runner
Browse files Browse the repository at this point in the history
resultを表示しないように変更
  • Loading branch information
Till0196 authored Jun 14, 2024
2 parents 88bc923 + 340352a commit ab1f58f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/cd-beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,13 @@ jobs:
UPDATE_DATA="{\"Prune\": ${PRUNE}, \"Env\": [$env_data], \"pullImage\": ${PULL_IMAGE}, \"stackFileContent\": \"$(cat ${COMPOSE_FILE} | tr -d '\r' | sed 's/"/\\"/g' | sed 's/$/\\n/' | tr -d '\n')\"}"
result=$(curl -sS -X PUT "${{ secrets.PORTAINER_URL }}/api/stacks/${STACK_ID}?endpointId=${ENDPOINT_ID}" -H "Content-Type: application/json" -gH "x-api-key:${{ secrets.PORTAINER_APIKEY }}" --data-binary "${UPDATE_DATA}")
result=$(echo "$result" | jq '.Env = ["***"]')
echo "$result"
if [[ $result == *"failed to deploy a stack:"* ]]; then
exit 1
fi
else
CREATE_DATA="{\"name\": \"${STACK_NAME}\", \"Env\": [$env_data], \"stackFileContent\": \"$(cat ${COMPOSE_FILE} | tr -d '\r' | sed 's/"/\\"/g' | sed 's/$/\\n/' | tr -d '\n')\"}"
result=$(curl -sS -X POST "${{ secrets.PORTAINER_URL }}/api/stacks?type=${STACK_TYPE}&method=string&endpointId=${ENDPOINT_ID}" -H "Content-Type: application/json" -gH "x-api-key:${{ secrets.PORTAINER_APIKEY }}" --data-binary "${CREATE_DATA}")
result=$(echo "$result" | jq '.Env = ["***"]')
echo "$result"
if [[ $result == *"failed to deploy a stack:"* ]]; then
exit 1
fi
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/cd-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,13 @@ jobs:
UPDATE_DATA="{\"Prune\": ${PRUNE}, \"Env\": [$env_data], \"pullImage\": ${PULL_IMAGE}, \"stackFileContent\": \"$(cat ${COMPOSE_FILE} | tr -d '\r' | sed 's/"/\\"/g' | sed 's/$/\\n/' | tr -d '\n')\"}"
result=$(curl -sS -X PUT "${{ secrets.PORTAINER_URL }}/api/stacks/${STACK_ID}?endpointId=${ENDPOINT_ID}" -H "Content-Type: application/json" -gH "x-api-key:${{ secrets.PORTAINER_APIKEY }}" --data-binary "${UPDATE_DATA}")
result=$(echo "$result" | jq '.Env = ["***"]')
echo "$result"
if [[ $result == *"failed to deploy a stack:"* ]]; then
exit 1
fi
else
CREATE_DATA="{\"name\": \"${STACK_NAME}\", \"Env\": [$env_data], \"stackFileContent\": \"$(cat ${COMPOSE_FILE} | tr -d '\r' | sed 's/"/\\"/g' | sed 's/$/\\n/' | tr -d '\n')\"}"
result=$(curl -sS -X POST "${{ secrets.PORTAINER_URL }}/api/stacks?type=${STACK_TYPE}&method=string&endpointId=${ENDPOINT_ID}" -H "Content-Type: application/json" -gH "x-api-key:${{ secrets.PORTAINER_APIKEY }}" --data-binary "${CREATE_DATA}")
result=$(echo "$result" | jq '.Env = ["***"]')
echo "$result"
if [[ $result == *"failed to deploy a stack:"* ]]; then
exit 1
fi
Expand Down

0 comments on commit ab1f58f

Please sign in to comment.