From d00ad332eddc8372d473a92d2841f947c6a94c20 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 5 Jun 2024 16:41:34 +0300 Subject: [PATCH 1/2] format README.md --- README.md | 74 +++++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 24dd747..954b4f9 100644 --- a/README.md +++ b/README.md @@ -39,30 +39,30 @@ Update coder templates automatically - main jobs: - update: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Get latest commit hash - id: latest_commit - run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - - name: Get commit title - id: commit_title - run: echo "title=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT - - - - name: Update Coder Template - uses: matifali/update-coder-template@v3 - with: - id: my-template - dir: my-template - url: https://coder.example.com - name: ${{ steps.latest_commit.outputs.hash }} - message: ${{ steps.commit_title.outputs.title }} - coder_session_token: ${{ secrets.CODER_SESSION_TOKEN }} + update: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Get latest commit hash + id: latest_commit + run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + + - name: Get commit title + id: commit_title + run: echo "title=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT + + - name: Update Coder Template + uses: matifali/update-coder-template@v3 + with: + id: my-template + dir: my-template + url: https://coder.example.com + name: ${{ steps.latest_commit.outputs.hash }} + message: ${{ steps.commit_title.outputs.title }} + coder_session_token: ${{ secrets.CODER_SESSION_TOKEN }} ``` - 2. Update a Coder template with a random version name without activating. ```yaml @@ -74,18 +74,18 @@ Update coder templates automatically - main jobs: - update: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Update Coder Template - uses: matifali/update-coder-template@v3 - with: - id: my-template - dir: my-template - url: https://coder.example.com - activate: false - coder_session_token: ${{ secrets.CODER_SESSION_TOKEN }} + update: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Update Coder Template + uses: matifali/update-coder-template@v3 + with: + id: my-template + dir: my-template + url: https://coder.example.com + activate: false + coder_session_token: ${{ secrets.CODER_SESSION_TOKEN }} ``` From c5dfa097d7df07d605d3e2f54f1b4fd5679bde5d Mon Sep 17 00:00:00 2001 From: M Atif Ali Date: Mon, 27 Jan 2025 15:32:06 +0500 Subject: [PATCH 2/2] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 954b4f9..48e18c7 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ Update coder templates automatically ## Usage +> [!NOTE] +> Please also check the offical Coder [`setup-action`](https://github.com/coder/setup-action) action. + 1. Create a GitHub secret named `CODER_SESSION_TOKEN` with your coder session token You can generate a long lived session token by running the following command in your browser console while logged into Coder with a **Template Admin** or **Owner** role.