Skip to content

Commit

Permalink
chore(version): v.2.2.3 (#47)
Browse files Browse the repository at this point in the history
* chore(version): v.2.2.3

* fix: make branch check more flexible
  • Loading branch information
meeroslav authored Jun 21, 2022
1 parent 8e1d815 commit e698d52
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ jobs:
# Default: false
error-on-no-successful-workflow: ''

# The type of event to check for the last successful commit corresponding to that workflow-id, e.g. push, pull-request, release etc.
#
# Default: push
last-successful-event: ''

# The path where your repository is. This is only required for cases where the repository code is checked out or moved to a specific path.
#
# Default: .
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
description: "By default, if no successful workflow is found on the main branch to determine the SHA, we will log a warning and use HEAD~1. Enable this option to error and exit instead."
default: "false"
last-successful-event:
description: "The type of event to check for the last successful commit corresponding to that workflow-id, E.g. push, pull-request, release etc"
description: "The type of event to check for the last successful commit corresponding to that workflow-id, e.g. push, pull-request, release etc"
default: "push"
working-directory:
description: "The directory where your repository is located"
Expand Down
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62890,7 +62890,8 @@ async function findSuccessfulCommit(workflow_id, run_id, owner, repo, branch, la
const shas = await octokit.request(`GET /repos/${owner}/${repo}/actions/workflows/${workflow_id}/runs`, {
owner,
repo,
branch,
// on non-push workflow runs we do not have branch property
branch: lastSuccessfulEvent !== 'push' ? undefined : branch,
workflow_id,
event: lastSuccessfulEvent,
status: 'success'
Expand Down
4 changes: 2 additions & 2 deletions find-successful-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ async function findSuccessfulCommit(workflow_id, run_id, owner, repo, branch, la
const shas = await octokit.request(`GET /repos/${owner}/${repo}/actions/workflows/${workflow_id}/runs`, {
owner,
repo,
// on release workflow runs do not have branch property
branch: lastSuccessfulEvent === 'release' ? undefined : branch,
// on non-push workflow runs we do not have branch property
branch: lastSuccessfulEvent !== 'push' ? undefined : branch,
workflow_id,
event: lastSuccessfulEvent,
status: 'success'
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "2.2.2",
"version": "2.2.3",
"license": "MIT",
"description": "This package.json is here purely to control the version of the Action, in combination with https://github.com/JamesHenry/publish-shell-action",
"scripts": {
Expand Down

0 comments on commit e698d52

Please sign in to comment.