Skip to content

Commit

Permalink
Merge pull request #3 from dkershner6/dkershner6-patch-1
Browse files Browse the repository at this point in the history
Update action.yml
  • Loading branch information
dkershner6 authored Aug 27, 2021
2 parents 54fae99 + 8318fe6 commit f31d935
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/pr-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,28 @@ jobs:
conditionals-with-values: |
${{ 'test' == 'not-test' }} => shouldnt be this one
${{ 'test' == 'test' }} => correctAnswer
true=>notThisOneEitherAlreadyReturned
false => nope
- run: echo ${{ steps.switch-case.outputs.value }}

# Optionally fail the workflow, should you choose
- name: Fail on non-correct answer
if: ${{ steps.switch-case.outputs.value != 'correctAnswer' }}
run: 'echo "Not Correct Answer :/" && exit 1'

version-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: dkershner6/npm-version-check-with-comment-action@v1
id: version-check
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- run: echo version changed - ${{ steps.version-check.outputs.version-did-change }}

- name: Fail on no version updated
if: ${{ steps.version-check.outputs.version-did-change == 'false' }}
run: 'echo "No version change :/" && exit 1'

auto-approve-pr:
Expand Down
7 changes: 6 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ runs:
with:
text: ${{ inputs.conditionals-with-values }}
regex: 'true\s*=>\s*(.*)?$'
- run: echo ${{ steps.parse-value.outputs.group1 }}
flags: m
- run: "echo ------------- Regex Results ------------"
shell: bash
- run: "echo found - ${{ steps.parse-value.outputs.match != '' }}"
shell: bash
- run: "echo group1 - ${{ steps.parse-value.outputs.group1 }}"
shell: bash

- name: Determine Message
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.0.0"
"version": "1.0.1"
}

0 comments on commit f31d935

Please sign in to comment.