From 2e3caf092239ff00f6e2f8dbe01b29acbaa90cfe Mon Sep 17 00:00:00 2001 From: Lillian Hwang-Geddes Date: Tue, 27 Jan 2026 15:58:38 -0500 Subject: [PATCH] add visibility flag to upload command --- .github/workflows/deploy_training_script.yaml | 68 +++++++++---------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/.github/workflows/deploy_training_script.yaml b/.github/workflows/deploy_training_script.yaml index 530c350..961e111 100644 --- a/.github/workflows/deploy_training_script.yaml +++ b/.github/workflows/deploy_training_script.yaml @@ -28,42 +28,40 @@ jobs: name: Deploy Latest ML Training Script to Desired Org timeout-minutes: 30 steps: - - name: Check out training script code - uses: actions/checkout@v3 - with: - submodules: recursive - token: ${{ secrets.TOKEN || github.token }} - - name: Setup Python3.10 - uses: actions/setup-python@v3 - with: - python-version: "3.10" + - name: Check out training script code + uses: actions/checkout@v3 + with: + submodules: recursive + token: ${{ secrets.TOKEN || github.token }} + - name: Setup Python3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" - - name: Setup Viam CLI - shell: bash - run: | - curl -o /usr/local/bin/viam https://storage.googleapis.com/packages.viam.com/apps/viam-cli/viam-cli-stable-linux-amd64 - chmod a+rx /usr/local/bin/viam - viam login api-key --key-id ${{ secrets.VIAM_API_KEY_ID }} --key ${{ secrets.VIAM_API_KEY }} + - name: Setup Viam CLI + shell: bash + run: | + curl -o /usr/local/bin/viam https://storage.googleapis.com/packages.viam.com/apps/viam-cli/viam-cli-stable-linux-amd64 + chmod a+rx /usr/local/bin/viam + viam login api-key --key-id ${{ secrets.VIAM_API_KEY_ID }} --key ${{ secrets.VIAM_API_KEY }} - - name: Create training package - shell: bash - run: | - python3 setup.py sdist --formats=gztar - - - name: Get name of first file with the correct extension - id: file-extension - shell: bash - run: | - echo "path_name=$(ls dist/*.tar.gz | head -1)" >> $GITHUB_OUTPUT - - - name: Push to Viam Registry - shell: bash - run: | - if [ -n "${{ github.event.release.tag_name }}" ]; then - VERSION="${{ github.event.release.tag_name }}" - else - VERSION=$(date -u +'%Y-%m-%dT%H-%M-%S') - fi - viam training-script upload --framework=${{ inputs.framework }} --org-id=${{ secrets.VIAM_ORG_ID }} --path=${{ steps.file-extension.outputs.path_name }} --script-name=${{ inputs.script_name }} --type=${{ inputs.model_type }} --version=$VERSION + - name: Create training package + shell: bash + run: | + python3 setup.py sdist --formats=gztar + - name: Get name of first file with the correct extension + id: file-extension + shell: bash + run: | + echo "path_name=$(ls dist/*.tar.gz | head -1)" >> $GITHUB_OUTPUT + - name: Push to Viam Registry + shell: bash + run: | + if [ -n "${{ github.event.release.tag_name }}" ]; then + VERSION="${{ github.event.release.tag_name }}" + else + VERSION=$(date -u +'%Y-%m-%dT%H-%M-%S') + fi + viam training-script upload --framework=${{ inputs.framework }} --org-id=${{ secrets.VIAM_ORG_ID }} --path=${{ steps.file-extension.outputs.path_name }} --script-name=${{ inputs.script_name }} --type=${{ inputs.model_type }} --version=$VERSION --visibility