Skip to content

Commit

Permalink
RSDK-7370 upload full-static from main and stable (viamrobotics#3887)
Browse files Browse the repository at this point in the history
  • Loading branch information
abe-winter authored May 3, 2024
1 parent 586e6e1 commit 2e97f5e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 13 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/full-static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ on:
description: a vX.X.X version string to use for file naming
required: false
type: string
# workflow_call: # todo: add this back when attaching latest/stable
# inputs:
# version:
# description: a channel or version tag for upload
# required: false
# type: string
# secrets:
# GCP_CREDENTIALS:
# required: true
workflow_call:
inputs:
channel:
description: a channel for file naming
required: false
type: string # 'choice' not supported in workflow_call
version:
description: a vX.X.X version string to use for file naming
required: false
type: string
secrets:
GCP_CREDENTIALS:
required: true

jobs:
full-static:
Expand All @@ -41,7 +45,9 @@ jobs:
with:
go-version: '1.21'

- name: build
- name: build js
run: make build-web
- name: build go
shell: bash
run: |
for goarch in ${{ env.GOARCHES }}; do
Expand Down Expand Up @@ -71,7 +77,7 @@ jobs:
working-directory: ${{ env.BINS_DIR }}
run: |
for arch in ${{ env.GOARCHES }}; do
mv viam*.$arch viam-server-${{ inputs.channel }}-static-$arch
mv viam*-$arch viam-server-${{ inputs.channel }}-static-$arch
done
- name: copy for channel+version
Expand All @@ -80,7 +86,7 @@ jobs:
working-directory: ${{ env.BINS_DIR }}
run: |
for arch in ${{ env.GOARCHES }}; do
cp viam*.$arch viam-server-${{ inputs.channel }}-${{ inputs.version }}-static-$arch
cp viam*-$arch viam-server-${{ inputs.channel }}-${{ inputs.version }}-static-$arch
done
- uses: google-github-actions/auth@v2
Expand All @@ -101,6 +107,9 @@ jobs:
if: inputs.channel
shell: bash
run: |
for arch in arm64 amd64 arm; do
for arch in ${{ env.GOARCHES }}; do
echo "- $arch https://storage.googleapis.com/${{ env.BUCKET }}/viam-server-${{ inputs.channel }}-static-$arch" >> $GITHUB_STEP_SUMMARY
if [ ${{ inputs.version }} ]; then
echo "- $arch https://storage.googleapis.com/${{ env.BUCKET }}/viam-server-${{ inputs.channel }}-${{ inputs.version }}-static-$arch" >> $GITHUB_STEP_SUMMARY
fi
done
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ jobs:
secrets:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}

full-static:
needs: test
uses: viamrobotics/rdk/.github/workflows/full-static.yml@main
with:
channel: latest
secrets:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}

droid:
needs: test
uses: viamrobotics/rdk/.github/workflows/droid.yml@main
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ jobs:
secrets:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}

full-static:
needs: test
uses: viamrobotics/rdk/.github/workflows/full-static.yml@main
with:
channel: stable
version: ${{ github.ref_name }}
secrets:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}

droid:
needs: test
uses: viamrobotics/rdk/.github/workflows/droid.yml@main
Expand Down

0 comments on commit 2e97f5e

Please sign in to comment.