Skip to content

Commit

Permalink
remove token check step
Browse files Browse the repository at this point in the history
  • Loading branch information
jgodson committed May 8, 2024
1 parent 558b7db commit 67dbd99
Showing 1 changed file with 4 additions and 24 deletions.
28 changes: 4 additions & 24 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,43 +43,23 @@ outputs:
runs:
using: 'composite'
steps:
- name: Check Oxygen version
shell: 'bash'
id: check_version
run: |
TOKEN="${{ inputs.oxygen_deployment_token }}"
echo "::add-mask::$TOKEN"
if [[ "${TOKEN}" == *":"* ]]; then
echo "Multi token"
IFS=':' read -ra token_list <<< "${TOKEN}"
token=${token_list[1]}
echo "::add-mask::$token"
echo "token=$token" >> $GITHUB_OUTPUT
else
if [[ "${TOKEN}" =~ ^[A-Za-z0-9+/]+[=]{0,2}$ ]]; then
echo "Token is in V2 format"
echo "token=${TOKEN}" >> $GITHUB_OUTPUT
else
echo "Your repository is out of date, please disconnect and reconnect your storefront on Shopify"
exit 1
fi
fi
- name: Build and Publish to Oxygen
shell: 'bash'
id: 'oxygen-cli-action'
env:
NODE_ENV: production
run: |
echo "Deploying to Oxygen..."
TOKEN="${{ inputs.oxygen_deployment_token }}"
echo "::add-mask::$TOKEN"
build_command_filtered=$(echo '${{ inputs.build_command }}' | sed 's/HYDROGEN_ASSET_BASE_URL=$OXYGEN_ASSET_BASE_URL //g')
oxygen_command="npm exec --package=@shopify/[email protected] -- oxygen-cli oxygen:deploy \
--path=${{ inputs.path }} \
--assetsFolder=${{ inputs.oxygen_client_dir }} \
--workerFolder=${{ inputs.oxygen_worker_dir }} \
--verificationMaxDuration=${{ inputs.oxygen_deployment_verification_max_duration }} \
--token=${{ steps.check_version.outputs.token }}"
--token=${{ TOKEN }}"
if [ "${{ inputs.oxygen_deployment_verification }}" == "false" ]; then
oxygen_command+=" --skipVerification"
fi
Expand Down

0 comments on commit 67dbd99

Please sign in to comment.