Test the action #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test the action | |
on: create | |
jobs: | |
test: | |
name: Test the action | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: dump context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo $GITHUB_CONTEXT | |
- name: dump the event | |
env: | |
GITHUB_EVENT: ${{ toJson(github.event) }} | |
run: echo $GITHUB_EVENT | |
- name: dump the event ref_type | |
env: | |
REF_TYPE: ${{ github.event.ref_type }} | |
run: echo $REF_TYPE | |
- name: dump the ref | |
env: | |
REF: ${{ github.event.ref }} | |
run: echo $REF | |
- name: Did we just create a branch? | |
if: ${{ github.event.ref_type == 'branch' }} | |
run: echo Yes we just created a branch | |
- name: Is it a release branch? | |
if: ${{ github.event.ref_type == 'branch' && ( contains(github.event.ref, 'release/') || contains(github.event.ref, 'release-') ) }} | |
run: echo Yes we are on a release branch | |
- name: Spit out the ref to the action then | |
if: ${{ github.event.ref_type == 'branch' && ( startsWith(github.event.ref, 'release/') || startsWith(github.event.ref, 'release-') ) }} | |
env: | |
REF: ${{ github.event.ref }} | |
run: echo $REF | |
- name: Run the actual action | |
if: ${{ github.event.ref_type == 'branch' && ( startsWith(github.event.ref, 'release/') || startsWith(github.event.ref, 'release-') ) }} | |
uses: ./ | |
id: branchVersion | |
- name: Dump the version info from the action outputs | |
env: | |
MAJOR: ${{ steps.branchVersion.outputs.major }} | |
MINOR: ${{ steps.branchVersion.outputs.minor }} | |
PATCH: ${{ steps.branchVersion.outputs.patch }} | |
MANIFEST_SAFE_VERSION_STRING: ${{ steps.branchVersion.outputs.manifestSafeVersionString }} | |
run: "echo major: $MAJOR minor: $MINOR patch: $PATCH manifestSafeVersionString: $MANIFEST_SAFE_VERSION_STRING" |