define sample apps in sample app json to be used by the console #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| branches: | ||
| - master | ||
| defaults: | ||
| run: | ||
| # Specify to ensure "pipefail and errexit" are set. | ||
| # Ref: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#defaultsrunshell | ||
| shell: bash | ||
| permissions: | ||
| contents: read | ||
| id-token: write # Required for OIDC authentication | ||
| deployments: write | ||
| jobs: | ||
| setup: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| app-list-json: ${{ steps.read-json.outputs.APP_LIST }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Read JSON | ||
| id: read-json | ||
| run: | | ||
| delimiter="$(openssl rand -hex 8)" | ||
| { | ||
| echo "APP_LIST<<${delimiter}" | ||
| sed -e '$a\' console-sample-apps.json # Ensures that an empty line is always present. | ||
| echo "${delimiter}" | ||
| } >> "$GITHUB_OUTPUT" | ||
| create-zip: | ||
| runs-on: ubuntu-latest | ||
| ### TODO THIS IS JUST FOR TEST | ||
| if: ${{ matrix.app.name == 'album-recommendation' || matrix.app.name == 'text-search' }} | ||
|
Check failure on line 47 in .github/workflows/deploy-to-cloud.yml
|
||
| ### TODO THIS IS JUST FOR TEST | ||
| needs: | ||
| - setup | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| app: ${{ fromJSON(needs.setup.outputs.app-list-json) }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Create artifact | ||
| env: | ||
| DEBUG: ${{ runner.debug }} # Automatically set by GitHub Actions when running in debug mode. | ||
| run: | | ||
| ./scripts/build-sample-app.sh "${{ matrix.app.name }}" | ||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: sample-app-${{ matrix.app.name }} | ||
| path: ${{ matrix.app.name }}/dist/ | ||
| deploy-json: | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: Vespa Cloud | ||
| url: https://cloud.vespa.ai | ||
| needs: | ||
| - create-zip | ||
| steps: | ||
| - name: Download All Packages | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: applications | ||
| pattern: sample-app-* | ||
| merge-multiple: true | ||
| - name: List | ||
| run: | | ||
| ls -l applications | ||