mirror of
https://github.com/matifali/update-coder-template.git
synced 2024-11-10 08:55:47 +08:00
format README.md
This commit is contained in:
parent
ccc49c4662
commit
d00ad332ed
1 changed files with 34 additions and 34 deletions
68
README.md
68
README.md
|
@ -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 }}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue