Skip to content

fix: logical prefixed not fails GitHub workflow syntax#64

Merged
maxrake merged 2 commits into
mainfrom
not_wrong
Jun 14, 2022
Merged

fix: logical prefixed not fails GitHub workflow syntax#64
maxrake merged 2 commits into
mainfrom
not_wrong

Conversation

@maxrake
Copy link
Copy Markdown
Contributor

@maxrake maxrake commented Jun 14, 2022

It turns out the following syntax is invalid for a GitHub Actions workflow:

# both of these forms fail the syntax check
if: ! contains(github.ref, 'rc')
if: !contains(github.ref, 'rc')

This was discovered after merging the new Docker workflow and attempting to trigger it

After searching the docs and coming up empty, a GitHub Community Forum post for this issue (but for startswith instead of contains) showed the way to go:

# it works if you enclose everything in double quotes
if: "!contains(github.ref, 'rc')"

# this also works and reads more cleanly to my eye
if: contains(github.ref, 'rc') != true

Closes #50

Checklist

  • Does this PR have an associated issue (i.e., closes #<issueNum> in description above)?
  • Have you ensured that you have met the expected acceptance criteria?
  • Have you created sufficient tests?
  • Have you updated all affected documentation?

@maxrake maxrake requested a review from a team as a code owner June 14, 2022 20:41
@maxrake maxrake requested a review from kylewillmon June 14, 2022 20:41
@maxrake maxrake self-assigned this Jun 14, 2022
furi0us333
furi0us333 previously approved these changes Jun 14, 2022
kylewillmon
kylewillmon previously approved these changes Jun 14, 2022
Comment thread .github/workflows/release.yml Outdated
A note in the workflow_dispatch documentation states:

> Note: The workflow will also receive the inputs in the
> `github.event.inputs` context. The information in the `inputs` context
> and `github.event.inputs` context is identical except that the
> `inputs` context preserves Boolean values as Booleans instead of
> converting them to strings.

Making the change universally helps to simplify the understanding of how
these inputs are provided and therefore how they can be used.
@maxrake maxrake dismissed stale reviews from kylewillmon and furi0us333 via 949044e June 14, 2022 22:46
@maxrake
Copy link
Copy Markdown
Contributor Author

maxrake commented Jun 14, 2022

The changes made in the most recent commit have been tested and confirmed to work...at least syntactically. Confirmation on the ability to trigger the repository_dispatch workflow still won't be possible until the changes here make it into the default (e.g., main) branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Coordinate phylum-ci Docker image releases with new CLI releases

3 participants