Deploy Base Template #8
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 Base Template | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| target_environment: | |
| description: Target environment | |
| required: true | |
| type: choice | |
| options: | |
| - staging | |
| - juliett | |
| - foxtrot | |
| use_cache: | |
| description: Use the build cache when available | |
| required: false | |
| type: boolean | |
| default: false | |
| concurrency: | |
| group: Base-Template-Release-${{ github.ref }}-${{ inputs.target_environment }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-template: | |
| name: Build E2B template | |
| runs-on: ubuntu-24.04 | |
| environment: ${{ inputs.target_environment }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Parse .tool-versions | |
| uses: wistia/parse-tool-versions@32f568a4ffd4bfa7720ebf93f171597d1ebc979a # v2.1.1 | |
| - name: Install bun | |
| uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| with: | |
| bun-version: "${{ env.BUN }}" | |
| - name: Build template | |
| working-directory: ./packages/shared/scripts | |
| run: | | |
| rm .env.local # auto read by bun, which we don't want | |
| echo "building base template for ${E2B_DOMAIN} ... " | |
| bun install | |
| bun run ./build.prod.ts | |
| env: | |
| E2B_API_KEY: ${{ secrets.E2B_API_KEY }} | |
| E2B_DOMAIN: ${{ vars.E2B_DOMAIN }} | |
| USE_CACHE: ${{ inputs.use_cache }} | |