Skip to content
Merged
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
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
# access to the target repository from public forks. This should remain as a pull_request
# trigger because checkout, build, format and checking for changes do not need elevated
# permissions to the repository. The reduced permissions for public forks is adequate.
# Since this will commit readme/recompile changes back to the branch, special attention
# should be paid to changes made to this workflow when reviewing the PR and granting
# Since this will commit readme/recompile changes back to the branch, special attention
# should be paid to changes made to this workflow when reviewing the PR and granting
# permission to first time contributors to run the workflow.
pull_request:
# Don't include any specific paths here so we always get a build that produces a status
Expand All @@ -15,10 +15,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
Expand All @@ -35,26 +35,26 @@ jobs:
# If this step results in changes, they will be committed in the last step
- name: Recompile and Format action
run: npm run build

- name: Check for code changes to the action
id: action-code
uses: im-open/did-custom-action-code-change@v1.0.1
uses: im-open/.github/.github/actions/did-custom-action-code-change@v2
with:
files-with-code: 'action.yml,package.json,package-lock.json'
folders-with-code: 'src,dist'
token: ${{ secrets.GITHUB_TOKEN }}

- name: Get the next version for the readme if there are code changes to the action
if: steps.action-code.outputs.HAS_CHANGES == 'true'
id: version
uses: im-open/git-version-lite@v2.1.2
uses: im-open/git-version-lite@v4

- name: Update readme with next version if there are code changes to the action
if: steps.action-code.outputs.HAS_CHANGES == 'true'
uses: im-open/update-action-version-in-file@v1.0.0
uses: im-open/.github/.github/actions/update-action-version-in-file@v2
with:
file-to-update: './README.md'
action-name: ${{ github.repository }}
action-name: ${{ github.repository }}
updated-version: ${{ steps.version.outputs.NEXT_VERSION }}

- name: Commit unstaged readme/recompile changes if there are code changes to the action
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/increment-version-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ jobs:
# on a pull_request_target. But we need to be extra careful not to trigger any script
# that may operate on PR controlled contents like in the case of npm install.
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
ref: main
fetch-depth: 0

# See https://github.com/im-open/git-version-lite for more details around how to increment
# major/minor/patch through commit messages
- name: Increment the version
uses: im-open/git-version-lite@v2
uses: im-open/git-version-lite@v4
id: version
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Create and update a PR comment, rather than creating a new one with every run.

## Inputs

| Parameter | Is Required | Description |
| -------------------- | ----------- | --------------------------------------------------------------------------- |
| `github-token` | true | The GitHub token for interacting with the repository. |
| `comment-identifier` | true | An unchanging identifier for the comment that should be updated or created. |
| `comment-content` | true | A string of Github-flavored markdown for your comment. |
| `pr-number` | false\* | The number for the target PR. |
| `pr-ref` | false\* | A git ref which points to a commit contained in the target PR. |
| `create-if-not-exists` | false. | If comment does not already exist, create it. Defaults to `true` |
| Parameter | Is Required | Description |
| ---------------------- | ----------- | --------------------------------------------------------------------------- |
| `github-token` | true | The GitHub token for interacting with the repository. |
| `comment-identifier` | true | An unchanging identifier for the comment that should be updated or created. |
| `comment-content` | true | A string of Github-flavored markdown for your comment. |
| `pr-number` | false\* | The number for the target PR. |
| `pr-ref` | false\* | A git ref which points to a commit contained in the target PR. |
| `create-if-not-exists` | false. | If comment does not already exist, create it. Defaults to `true` |

**_\* If the workflow containing this action is not running from a `pull_request` or `pull_request_target` event, one of these parameters is required._**

Expand All @@ -32,11 +32,11 @@ jobs:
jobname:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6

- name: 'Create or Update PR Comment'
# You may also reference just the major or major.minor version.
uses: im-open/update-pr-comment@v1.2.2
uses: im-open/update-pr-comment@v2.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-identifier: 'specific-comment-identifier' # this should not change
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ inputs:
pr-number:
required: false
description: The number for the target PR

create-if-not-exists:
required: false
description: If comment does not already exist, create it
default: 'true'
runs:
using: 'node20'
using: 'node24'
main: 'dist/index.js'
Loading
Loading