-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Boolean handling workaround for workflow_call vs workflow_dispatch bug.
This fix will resolve the issue noticed in the runs post release prep. https://github.com/usnistgov/OSCAL/runs/6311164174 https://github.com/usnistgov/OSCAL/runs/6311163976 This is a workaround report in this thread. community/community#9343 (comment) It pertains to this issue, which has yet to be fixed in GitHub Actions runners that exhibit a difference in behavior for the same boolean input being treated as a string in a `workflow_dispatch` `inputs` (i.e. `github.event.inputs.*`) even if `type: boolean` is set but behaves properly as intended for `workflow_call` `inputs` (`inputs.*` which are different in the object graph) and treated as bools through and through. This is reported in actions/runner#1483. To resolve this, the buggy `workflow_dispatch` `github.event.inputs.*` will be left with the workaround as-is, conditional checking the values as strings, but we revert the changes for `workflow_call` `inputs.*` and leave them like before until actions/runner#1483 is resolved.
- Loading branch information
1 parent
f362159
commit 140f482
Showing
3 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ jobs: | |
id: checkout_latest_workflow | ||
# use this for builds triggered from other workflows on protected branches | ||
- name: Checkout Latest (using access_token) | ||
if: github.event_name == 'push' && inputs.commit_resources == 'true' | ||
if: github.event_name == 'push' && inputs.commit_resources == true | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ${{ env.CHECKOUT_PATH }} | ||
|
@@ -131,7 +131,7 @@ jobs: | |
# --------------- | ||
- name: Publish Schemas and Converters | ||
# only do this on master | ||
if: github.event.inputs.commit_resources == 'true' || inputs.commit_resources == 'true' | ||
if: github.event.inputs.commit_resources == 'true' || inputs.commit_resources == true | ||
uses: stefanzweifel/[email protected] | ||
with: | ||
repository: ${{ env.CHECKOUT_PATH }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,7 @@ jobs: | |
id: checkout_main_workflow | ||
# use this for builds triggered from other workflows on protected branches | ||
- name: Checkout Main (using access_token) | ||
if: github.event_name == 'push' && inputs.commit_resources == 'true' | ||
if: github.event_name == 'push' && inputs.commit_resources == true | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ${{ env.MAIN_PATH }} | ||
|
@@ -167,7 +167,7 @@ jobs: | |
retention-days: 5 | ||
- name: Publish Generated Pages | ||
# only do this on master | ||
if: github.event.inputs.commit_resources == 'true' || inputs.commit_resources == 'true' | ||
if: github.event.inputs.commit_resources == 'true' || inputs.commit_resources == true | ||
uses: stefanzweifel/[email protected] | ||
with: | ||
repository: ${{ env.MAIN_PATH }} | ||
|
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