|
12 | 12 | workflow_dispatch:
|
13 | 13 |
|
14 | 14 | jobs:
|
15 |
| -deploy: |
| 15 | +deploy_image: |
16 | 16 | runs-on:ubuntu-latest
|
17 | 17 | steps:
|
18 | 18 | -name:Get branch name
|
|
47 | 47 | tags:"codercom/oss-dogfood:${{ steps.docker-tag-name.outputs.tag }},codercom/oss-dogfood:latest"
|
48 | 48 | cache-from:type=registry,ref=codercom/oss-dogfood:latest
|
49 | 49 | cache-to:type=inline
|
| 50 | +deploy_template: |
| 51 | +runs-on:ubuntu-latest |
| 52 | +steps: |
| 53 | + -name:Checkout |
| 54 | +uses:actions/checkout@v3 |
| 55 | + -name:Get short commit SHA |
| 56 | +id:vars |
| 57 | +run:echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" |
| 58 | + -name:"Install latest Coder" |
| 59 | +run:| |
| 60 | + curl -L https://coder.com/install.sh | sh |
| 61 | +# env: |
| 62 | +# VERSION: 0.x |
| 63 | + -name:"Push template" |
| 64 | +run:| |
| 65 | + coder templates push $CODER_TEMPLATE_NAME --directory $CODER_TEMPLATE_DIR --yes --name=$CODER_TEMPLATE_VERSION |
| 66 | +env: |
| 67 | +# Consumed by Coder CLI |
| 68 | +CODER_URL:${{ secrets.CODER_URL }} |
| 69 | +CODER_SESSION_TOKEN:${{ secrets.CODER_TOKEN }} |
| 70 | +# Template source & details |
| 71 | +CODER_TEMPLATE_NAME:${{ secrets.CODER_TEMPLATE_NAME }} |
| 72 | +CODER_TEMPLATE_VERSION:${{ steps.vars.outputs.sha_short }} |
| 73 | +CODER_TEMPLATE_DIR:./dogfood |