diff --git a/.github/actions/upload-wheel/action.yml b/.github/actions/upload-wheel/action.yml index c4ae5b0..7728b43 100644 --- a/.github/actions/upload-wheel/action.yml +++ b/.github/actions/upload-wheel/action.yml @@ -1,6 +1,10 @@ name: "wheel upload to gemfury" description: "we build our wheel here and upload it to gemfury" +env: + GEMFURY_MASTER_TOKEN: value + TEST_VAR: val + runs: using: "composite" steps: @@ -21,12 +25,20 @@ runs: sudo apt-get update sudo apt-get install fury-cli shell: bash + - name: retrieve gemfury token + run: | + echo "TEST_VAR=$(aws secretsmanager get-secret-value --secret-id gemfury-push-yank | jq .SecretString | sed -e 's/\\//g' | sed -e 's/.$//' | sed -e 's/\"//' | jq .GEMFURY_MASTER_TOKEN)" >> "$GITHUB_ENV" + echo "::add-mask::TEMP_VAR=$(aws secretsmanager get-secret-value --secret-id gemfury-push-yank | jq .SecretString | sed -e 's/\\//g' | sed -e 's/.$//' | sed -e 's/\"//' | jq .GEMFURY_MASTER_TOKEN)" + echo $TEMP_VAR + echo "GEMFURY_MASTER_TOKEN=$TEMP_VAR" >> "$GITHUB_ENV" + shell: bash - name: push wheel to gemfury run: | - echo "add-mask::export GEMFURY_MASTER_TOKEN=$(aws secretsmanager get-secret-value --secret-id gemfury-push-yank | jq .SecretString | sed -e \'s/\\//g\' | sed -e \'s/.$//\' | sed -e \'s/\"//\' | jq .GEMFURY_MASTER_TOKEN)" python -m pip install wheel-filename sudo apt install jq export PACKAGE_VERSION=`wheel-filename dist/$(ls dist -1 | grep whl) | jq -r '.version'` - fury yank qcog_python_client -v $PACKAGE_VERSION --account qognitive --api-token ${GEMFURY_MASTER_TOKEN} || echo "No existing package to remove, moving on to push." - fury push dist/$(ls dist -1 | grep whl) --api-token ${GEMFURY_MASTER_TOKEN} + echo ${{ env.TEST_VAR }} + echo ${{ env.GEMFURY_MASTER_TOKEN }} + fury yank qcog_python_client -v $PACKAGE_VERSION --account qognitive --api-token ${{ env.GEMFURY_MASTER_TOKEN }} || echo "No existing package to remove, moving on to push." + fury push dist/$(ls dist -1 | grep whl) --api-token ${{ env.GEMFURY_MASTER_TOKEN }} shell: bash