format README.md

This commit is contained in:
Muhammad Atif Ali 2024-06-05 16:41:34 +03:00 committed by GitHub
parent ccc49c4662
commit d00ad332ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,30 +39,30 @@ Update coder templates automatically
- main - main
jobs: jobs:
update: update:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 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: Get latest commit hash
id: latest_commit
run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Update Coder Template - name: Get commit title
uses: matifali/update-coder-template@v3 id: commit_title
with: run: echo "title=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
id: my-template
dir: my-template - name: Update Coder Template
url: https://coder.example.com uses: matifali/update-coder-template@v3
name: ${{ steps.latest_commit.outputs.hash }} with:
message: ${{ steps.commit_title.outputs.title }} id: my-template
coder_session_token: ${{ secrets.CODER_SESSION_TOKEN }} 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. 2. Update a Coder template with a random version name without activating.
```yaml ```yaml
@ -74,18 +74,18 @@ Update coder templates automatically
- main - main
jobs: jobs:
update: update:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Update Coder Template - name: Update Coder Template
uses: matifali/update-coder-template@v3 uses: matifali/update-coder-template@v3
with: with:
id: my-template id: my-template
dir: my-template dir: my-template
url: https://coder.example.com url: https://coder.example.com
activate: false activate: false
coder_session_token: ${{ secrets.CODER_SESSION_TOKEN }} coder_session_token: ${{ secrets.CODER_SESSION_TOKEN }}
``` ```