Skip to content

Commit

Permalink
deps: update workflow actions
Browse files Browse the repository at this point in the history
  • Loading branch information
amis92 committed Oct 14, 2022
1 parent 541e183 commit d59eb48
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/chatops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ jobs:
if: startsWith(github.event.comment.body, '/')
steps:
- name: /command dispatch
uses: peter-evans/slash-command-dispatch@v2
uses: peter-evans/slash-command-dispatch@v3
with:
token: ${{ secrets.SLASH_COMMAND_DISPATCH_TOKEN }}
reaction-token: ${{ github.token }}
config: >
[
{
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Test with Pester
run: ./test.ps1
- name: Invoke action
Expand Down Expand Up @@ -43,20 +43,20 @@ jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build module docs
uses: ./
with:
script: |
./build-docs.ps1 -Clean
git status --porcelain || (throw "Documentation isn't up to date. Run 'build-docs.ps1' and commit changes.")
git status --porcelain || $(throw "Documentation isn't up to date. Run 'build-docs.ps1' and commit changes.")
self-testing:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

# return string result
- name: Test that returned result string is not json serialized (act)
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/demo-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add run link to command comment
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
body: "[Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})"
- uses: actions/checkout@v3
- name: Get script text
uses: Amadevus/pwsh-script@v1
uses: ./
id: get-script-text
with:
script: |
Expand All @@ -37,15 +38,15 @@ jobs:
}
return $script
- name: Execute user script
uses: Amadevus/pwsh-script@v1
uses: ./
id: user-script
with:
script: |
$github.token = $null
$github.event.client_payload = $null
${{ steps.get-script-text.outputs.result }}
- name: Prettify result json
uses: Amadevus/pwsh-script@v1
uses: ./
id: pretty-result
env:
RESULT_JSON: ${{ steps.user-script.outputs.result }}
Expand All @@ -62,7 +63,7 @@ jobs:
}
return $result
- name: Comment with script result in code fence
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@v2
if: always()
with:
issue-number: ${{ github.event.client_payload.github.payload.issue.number }}
Expand All @@ -76,12 +77,12 @@ jobs:
${{ steps.user-script.outputs.error }}
```
- name: Add reaction to command comment on success
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reactions: hooray
- name: Add reaction to command comment on failure
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@v2
if: failure()
with:
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tag-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
tag_name: ${{ github.event.client_payload.slash_command.args.unnamed.arg1 }}
steps:
- name: Add run link to command comment
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
body: "[Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.slash_command.args.named.ref }}
- name: Resolve version, tag and push
Expand All @@ -30,10 +30,10 @@ jobs:
if (-not $tag) {
throw "Can't create empty-named tag. Please specify tag after command: /tag vX.Y.Z"
}
git tag $tag $force || (throw "git tag $tag $force failed.")
git push origin $tag $force || (throw "git push origin $tag $force failed.")
git tag $tag $force || $(throw "git tag $tag $force failed.")
git push origin $tag $force || $(throw "git push origin $tag $force failed.")
- name: Add tag info and reaction to command comment
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
body: |
Expand All @@ -42,7 +42,7 @@ jobs:
[tag]: https://github.com/${{ github.repository }}/tree/${{ env.tag_name }}
reactions: hooray
- name: Add reaction to command comment on failure
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@v2
if: failure()
with:
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
Expand Down

0 comments on commit d59eb48

Please sign in to comment.