name: Update Coder Template description: An action to deploy changes to your coder template automatically author: "Muhammad Atif Ali " branding: icon: arrow-up-circle color: green inputs: id: description: "Template identifier (e.g. my-template)" required: true url: description: "Coder access URL (e.g. https://coder.example.com)" required: true coder_session_token: description: "Coder session token" required: true dir: description: "Template directory name (path to the directory containing the main.tf file default: TEMPLATE_NAME)" required: false name: description: "Template version name (e.g. v1.0.0, commit hash, etc.), should be unique, default: a random string" required: false activate: description: "Marks the current template version as active" required: false default: "true" message: description: "update message" required: false default: "Updated via update-coder-template action" create: description: "Creates a new template if it does not exist" required: false default: "true" runs: using: "composite" steps: - run: curl -fsSL $CODER_URL/bin/coder-linux-amd64 -o /usr/local/bin/coder && chmod +x /usr/local/bin/coder shell: bash env: CODER_URL: ${{ inputs.url }} - run: push_template.sh shell: bash env: CODER_SESSION_TOKEN: ${{ inputs.coder_session_token }} CODER_URL: ${{ inputs.url }} CODER_TEMPLATE_ID: ${{ inputs.id }} CODER_TEMPLATE_DIR: ${{ inputs.dir }} CODER_TEMPLATE_VERSION_NAME: ${{ inputs.name }} CODER_TEMPLATE_ACTIVATE: ${{ inputs.activate }} CODER_TEMPLATE_MESSAGE: ${{ inputs.message }} CODER_TEMPLATE_CREATE: ${{ inputs.create }}