Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 47 additions & 46 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: test
name: CI action

on:
workflow_dispatch:
inputs:
number:
description: 'Issue/PR number'
required: true
sha:
description: 'Commit SHA'
required: true
pull_request:
branches:
- main
push:
branches:
- main

permissions:
contents: read

jobs:
issue-normal-mode:
Expand All @@ -19,23 +20,23 @@ jobs:
uses: actions/checkout@v2

- name: normal mode - create comment
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
number: ${{ github.event.inputs.number }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
id: normal-mode-comment
message: 'normal mode - create comment'

- name: Do some work
run: echo "this step just prints this"

- name: normal mode - update comment
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
number: ${{ github.event.inputs.number }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
id: normal-mode-comment
message: 'normal mode - update comment'

Expand All @@ -47,23 +48,23 @@ jobs:
uses: actions/checkout@v2

- name: append mode - create comment
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
number: ${{ github.event.inputs.number }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
id: append-mode-comment
message: 'append mode - create comment'

- name: Do some work
run: echo "this step just prints this"

- name: append mode - append comment
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
number: ${{ github.event.inputs.number }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
id: append-mode-comment
append: true
message: 'append mode - appended message to the create comment'
Expand All @@ -76,22 +77,22 @@ jobs:
uses: actions/checkout@v2

- name: recreate mode - create comment
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
number: ${{ github.event.inputs.number }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
id: recreate-mode-comment
message: 'recreate mode - create comment'

- name: Do some work
run: echo "this step just prints this"

- name: recreate mode - append comment
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
repository: ${{ github.repository }}
number: ${{ github.event.inputs.number }}
id: recreate-mode-comment
recreate: true
Expand All @@ -105,10 +106,10 @@ jobs:
uses: actions/checkout@v2

- name: normal mode - create comment
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
repository: ${{ github.repository }}
commit-sha: ${{ github.event.inputs.sha }}
id: normal-mode-comment
message: 'normal mode - create comment'
Expand All @@ -117,10 +118,10 @@ jobs:
run: echo "this step just prints this"

- name: normal mode - update comment
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
repository: ${{ github.repository }}
commit-sha: ${{ github.event.inputs.sha }}
id: normal-mode-comment
message: 'normal mode - update comment'
Expand All @@ -133,10 +134,10 @@ jobs:
uses: actions/checkout@v2

- name: append mode - create comment
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
repository: ${{ github.repository }}
commit-sha: ${{ github.event.inputs.sha }}
id: append-mode-comment
message: 'append mode - create comment'
Expand All @@ -145,10 +146,10 @@ jobs:
run: echo "this step just prints this"

- name: append mode - append comment
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
repository: ${{ github.repository }}
commit-sha: ${{ github.event.inputs.sha }}
id: append-mode-comment
append: true
Expand All @@ -162,10 +163,10 @@ jobs:
uses: actions/checkout@v2

- name: recreate mode - create comment
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
repository: ${{ github.repository }}
commit-sha: ${{ github.event.inputs.sha }}
id: recreate-mode-comment
message: 'recreate mode - create comment'
Expand All @@ -174,10 +175,10 @@ jobs:
run: echo "this step just prints this"

- name: recreate mode - append comment
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
repository: ${{ github.repository }}
commit-sha: ${{ github.event.inputs.sha }}
id: recreate-mode-comment
recreate: true
Expand All @@ -192,10 +193,10 @@ jobs:
uses: actions/checkout@v2

- name: Should error out and not comment anything
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
repository: ${{ github.repository }}
number: ${{ github.event.inputs.number }}
id: fail-mode-comment
recreate: true
Expand All @@ -211,10 +212,10 @@ jobs:
uses: actions/checkout@v2

- name: Error out
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
repository: ${{ github.repository }}
number: ${{ github.event.inputs.number }}
commit-sha: ${{ github.event.inputs.sha }}
id: fail-mode-issue-commit-both
Expand All @@ -229,10 +230,10 @@ jobs:
uses: actions/checkout@v2

- name: Error out
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
repository: ${{ github.repository }}
id: fail-mode-issue-commit-none
message: 'should error out as both number and sha fields are not given'

Expand All @@ -245,10 +246,10 @@ jobs:
uses: actions/checkout@v2

- name: Should comment and fail this job
uses: hasura/comment-progress@test
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: 'hasura/comment-progress'
repository: ${{ github.repository }}
number: ${{ github.event.inputs.number }}
id: fail-comment
fail: true
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ inputs:
required: false
default: false
runs:
using: 'node12'
using: 'node20'
main: 'dist/index.js'
Loading