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

Make GHA workflow reusable #407

Closed
wants to merge 6 commits into from
Closed

Make GHA workflow reusable #407

wants to merge 6 commits into from

Conversation

SaschaMann
Copy link
Contributor

@SaschaMann SaschaMann commented Mar 9, 2022

This allows people to use the workflow without copying its entirety, similarly to calling an action.

More info: https://docs.github.com/en/actions/using-workflows/reusing-workflows

Test run: https://github.com/julia-actions/Example.jl/runs/5474751558?check_suite_focus=true (for a scheduled test run, you might have to check back in a few hours)


@DilumAluthge do you happen to have a way to test if it actually works when a dependency has to be bumped? Some kind of example package? That way the secrets could be tested properly

@SaschaMann SaschaMann requested a review from DilumAluthge March 9, 2022 03:24
secrets:
DOCUMENTER_KEY:
description: 'An SSH deploy key. See docs for more info.'
required: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this actually required? I'm never sure.

If not:

Suggested change
required: true
required: false

@DilumAluthge
Copy link
Member

Would it be better to first get #379 merged?

@SaschaMann
Copy link
Contributor Author

Oops, I forgot about that PR. The composite action is more flexible and there's not much point in having both in this case.

@SaschaMann SaschaMann closed this Mar 9, 2022
@SaschaMann SaschaMann deleted the sm/reusable-workflow branch March 9, 2022 21:08
@DilumAluthge
Copy link
Member

What do end-users tend to prefer using? Composite workflows or re-usable workflows?

@SaschaMann
Copy link
Contributor Author

SaschaMann commented Mar 9, 2022

I don't really know, they're both relatively new so I'm not sure what people prefer for workflows/actions that are fairly simple like this one.

The main advantage of the composite action would be that people can run things before or after it, the workflow is every so slightly shorter (doesn't require setting an OS for example).

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.

2 participants