Skip to content

Commit a16ab1c

Browse files
committed
fix: rename CODER_ACCESS_URL to CODER_URL
1 parent 55e892b commit a16ab1c

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Update coder templates automatically
1111

1212
| Name | Description | Default |
1313
| ------------------------- | ------------------------------------------------------------------------ | ----------------------------- |
14-
| `CODER_ACCESS_URL` | **Required** The url of coder deployment (e.g. <https://dev.coder.com>). | - |
14+
| `CODER_URL` | **Required** The url of coder deployment (e.g. <https://dev.coder.com>). | - |
1515
| `CODER_SESSION_TOKEN` | **Required** The session token of coder. | `secrets.CODER_SESSION_TOKEN` |
1616
| `CODER_TEMPLATE_NAME` | **Required** The name of template. | - |
1717
| `CODER_TEMPLATE_DIR` | The directory of template. | `CODER_TEMPLATE_NAME` |
@@ -45,7 +45,7 @@ Update coder templates automatically
4545
with:
4646
CODER_TEMPLATE_NAME: "my-template"
4747
CODER_TEMPLATE_DIR: "my-template"
48-
CODER_ACCESS_URL: "https://coder.example.com"
48+
CODER_URL: "https://coder.example.com"
4949
CODER_TEMPLATE_VERSION: "${{ steps.latest_commit.outputs.hash }}"
5050
CODER_SESSION_TOKEN: ${{ secrets.CODER_SESSION_TOKEN }}
5151
```
@@ -72,7 +72,7 @@ Update coder templates automatically
7272
with:
7373
CODER_TEMPLATE_NAME: "my-template"
7474
CODER_TEMPLATE_DIR: "my-template"
75-
CODER_ACCESS_URL: "https://coder.example.com"
75+
CODER_URL: "https://coder.example.com"
7676
CODER_TEMPLATE_ACTIVATE: "false"
7777
CODER_SESSION_TOKEN: ${{ secrets.CODER_SESSION_TOKEN }}
7878
```

action.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ inputs:
1111
CODER_TEMPLATE_NAME:
1212
description: "Template name"
1313
required: true
14-
CODER_ACCESS_URL:
14+
CODER_URL:
1515
description: "Coder access URL (e.g. https://coder.example.com)"
1616
required: true
1717
CODER_SESSION_TOKEN:
@@ -34,7 +34,7 @@ runs:
3434
image: "Dockerfile"
3535
env:
3636
CODER_SESSION_TOKEN: ${{ inputs.CODER_SESSION_TOKEN }}
37-
CODER_ACCESS_URL: ${{ inputs.CODER_ACCESS_URL }}
37+
CODER_URL: ${{ inputs.CODER_URL }}
3838
CODER_TEMPLATE_NAME: ${{ inputs.CODER_TEMPLATE_NAME }}
3939
CODER_TEMPLATE_DIR: ${{ inputs.CODER_TEMPLATE_DIR }}
4040
CODER_TEMPLATE_VERSION: ${{ inputs.CODER_TEMPLATE_VERSION }}

entrypoint.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ set -euo pipefail
55
: "${CODER_SESSION_TOKEN:?Variable not set or empty}"
66
echo "CODER_SESSION_TOKEN is set."
77

8-
: "${CODER_ACCESS_URL:?Variable not set or empty}"
9-
echo "CODER_ACCESS_URL: ${CODER_ACCESS_URL}"
8+
: "${CODER_URL:?Variable not set or empty}"
9+
echo "CODER_URL: ${CODER_URL}"
1010

11-
echo "Pushing ${CODER_TEMPLATE_NAME} to ${CODER_ACCESS_URL}..."
11+
echo "Pushing ${CODER_TEMPLATE_NAME} to ${CODER_URL}..."
1212

1313
# Set default values if variables are empty
1414
CODER_TEMPLATE_DIR=${CODER_TEMPLATE_DIR:-$CODER_TEMPLATE_NAME}
1515
echo "CODER_TEMPLATE_DIR is set to ${CODER_TEMPLATE_DIR}"
1616

1717
# Construct push command
18-
push_command="coder templates push ${CODER_TEMPLATE_NAME} --directory ./${CODER_TEMPLATE_DIR}" --url ${CODER_ACCESS_URL} --token ${CODER_SESSION_TOKEN}
18+
push_command="coder templates push ${CODER_TEMPLATE_NAME} --directory ./${CODER_TEMPLATE_DIR}" --url ${CODER_URL} --token ${CODER_SESSION_TOKEN}
1919

2020
# Add version to the push command if specified
2121
if [ -n "${CODER_TEMPLATE_VERSION}" ]; then
@@ -33,4 +33,4 @@ push_command+=" --yes"
3333
# Execute the push command
3434
${push_command}
3535

36-
echo "Template ${CODER_TEMPLATE_NAME} pushed to ${CODER_ACCESS_URL}."
36+
echo "Template ${CODER_TEMPLATE_NAME} pushed to ${CODER_URL}."

0 commit comments

Comments
 (0)