From b012b4a810e80585b8fd8e81e41b95f51e87ab0d Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 18 Jul 2023 12:08:58 +0300 Subject: [PATCH] chore: use commit title as template message in dogfood (#8570) Co-authored-by: Mathias Fredriksson --- .github/workflows/dogfood.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dogfood.yaml b/.github/workflows/dogfood.yaml index 9dc2ae56c1..f1424d940a 100644 --- a/.github/workflows/dogfood.yaml +++ b/.github/workflows/dogfood.yaml @@ -51,22 +51,30 @@ jobs: tags: "codercom/oss-dogfood:${{ steps.docker-tag-name.outputs.tag }},codercom/oss-dogfood:latest" cache-from: type=registry,ref=codercom/oss-dogfood:latest cache-to: type=inline + deploy_template: needs: deploy_image runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 + - name: Get short commit SHA id: vars run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + + - name: Get Latest Commit Title + id: message + run: echo "pr_title==$(git log --format=%s -n 1 ${{ github.sha }})" >> $GITHUB_OUTPUT + - name: "Get latest Coder binary from the server" run: | curl -fsSL "https://dev.coder.com/bin/coder-linux-amd64" -o "./coder" chmod +x "./coder" + - name: "Push template" run: | - ./coder templates push $CODER_TEMPLATE_NAME --directory $CODER_TEMPLATE_DIR --yes --name=$CODER_TEMPLATE_VERSION + ./coder templates push $CODER_TEMPLATE_NAME --directory $CODER_TEMPLATE_DIR --yes --name=$CODER_TEMPLATE_VERSION --message="$CODER_TEMPLATE_MESSAGE" env: # Consumed by Coder CLI CODER_URL: https://dev.coder.com @@ -75,3 +83,4 @@ jobs: CODER_TEMPLATE_NAME: ${{ secrets.CODER_TEMPLATE_NAME }} CODER_TEMPLATE_VERSION: ${{ steps.vars.outputs.sha_short }} CODER_TEMPLATE_DIR: ./dogfood + CODER_TEMPLATE_MESSAGE: ${{ steps.message.outputs.pr_title }}