Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use github.workflow_ref to fix issues when workflow files are renamed #41

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

fgrosse
Copy link
Owner

@fgrosse fgrosse commented Aug 23, 2024

When the workflow file in a repository is renamed, the GitHub CLI will choke on listing workflow runs:

  ++ gh run list --status=success --branch=main --workflow=CI --event=push --json=databaseId --limit=1 -q '.[] | .databaseId'
  could not resolve to a unique workflow; found: ci.yaml pr-ci.yaml

This PR changes the logic to determine the --workflow argument. Instead of using the human readable workflow name, we can use the filename of the workflow to make gh happy.

@fgrosse fgrosse merged commit ba3f798 into main Aug 23, 2024
6 checks passed
@fgrosse fgrosse deleted the use-specific-workflow-file branch August 23, 2024 07:49
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.

1 participant