Skip to content

Commit 6a8061e

Browse files
authored
chore: use commit title as template message in dogfood
1 parent 6b978be commit 6a8061e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/dogfood.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,27 @@ jobs:
5757
steps:
5858
- name: Checkout
5959
uses: actions/checkout@v3
60-
- name: Get short commit SHA
61-
id: vars
62-
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
60+
6361
- name: "Get latest Coder binary from the server"
6462
run: |
6563
curl -fsSL "https://dev.coder.com/bin/coder-linux-amd64" -o "./coder"
6664
chmod +x "./coder"
65+
66+
- name: Get Latest Commit Title
67+
id: message
68+
run: |
69+
pr_title=$(git log --format=%s -n 1 ${{ github.sha }})
70+
echo "PR title=$pr_title" >> $GITHUB_OUTPUT
71+
6772
- name: "Push template"
6873
run: |
69-
./coder templates push $CODER_TEMPLATE_NAME --directory $CODER_TEMPLATE_DIR --yes --name=$CODER_TEMPLATE_VERSION
74+
./coder templates push $CODER_TEMPLATE_NAME --directory $CODER_TEMPLATE_DIR --yes --name=$CODER_TEMPLATE_VERSION --message=$CODER_TEMPLATE_MESSAGE
7075
env:
7176
# Consumed by Coder CLI
7277
CODER_URL: https://dev.coder.com
7378
CODER_SESSION_TOKEN: ${{ secrets.CODER_SESSION_TOKEN }}
7479
# Template source & details
7580
CODER_TEMPLATE_NAME: ${{ secrets.CODER_TEMPLATE_NAME }}
76-
CODER_TEMPLATE_VERSION: ${{ steps.vars.outputs.sha_short }}
81+
CODER_TEMPLATE_VERSION: ${{ github.sha }}
7782
CODER_TEMPLATE_DIR: ./dogfood
83+
CODER_TEMPLATE_MESSAGE: ${{ steps.message.output.pr_title }}

0 commit comments

Comments
 (0)