Skip to content

Make workflow-trigger an input to download artifact step #104

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

Merged
merged 4 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/build-book.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@ on:
default: 'false'
type: string
code_artifact_name:
description:
description: 'Name of zipped artifact passed in, instead of checking out the repository.'
required: false
default: 'code-zip'
type: string
trigger_workflow:
description: 'Identify the workflow that produced the artifact'
required: false
default: trigger-book-build.yaml

secrets:
ARM_USERNAME:
Expand Down Expand Up @@ -75,7 +79,7 @@ jobs:
uses: dawidd6/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: trigger-book-build.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line is needed to identify the workflow that produced the artifact.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, so it doesn't start a new action. On the portal site, this isn't a workflow though. The workflow that produces the artifact will be in publish-site.yaml. I'll try changing this to be an optional input with the trigger-book-build.yaml as its default value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That explains why the error on my fork say "Error: no matching workflow run found with any artifacts?"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any other questions I have about the inputs to this step can be answered in the action-download-artifact documentation 🤦‍♀️

workflow: input.trigger_workflow
run_id: ${{ github.event.workflow_run.id }}
name: ${{ inputs.code_artifact_name }}

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,6 @@ dmypy.json

# Pyre type checker
.pyre/

# IDEs
settings.json