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

package: fix relative paths and embedded composite actions #22

Merged
merged 2 commits into from
May 9, 2024

Conversation

ryancragun
Copy link
Contributor

@ryancragun ryancragun commented May 9, 2024

Fix several small issues that make it possible to migrate from the prior
Docker based version to the composite action version

  • Check out the action repo into a different directory when building nfpm_template
  • Execute nfpm from the root workspace directory to support relative
    paths in configs
  • Work around runners bugs when executing composite actions inside the
    scope of other composite actions.

@ryancragun ryancragun force-pushed the ryan/dont-clobber-caller-checkout-dir branch from df76c28 to 27fd731 Compare May 9, 2024 20:24
Fix several small issues that make it possible to migrate from the prior
Docker based version to the composite action version

* Check out the action repo into a different directory when building nfpm
* Execute nfpm from the root workspace directory to support relative
  paths in configs
* Work around runners bugs when executing composite actions inside the
  scope of other composite actions.

Signed-off-by: Ryan Cragun <me@ryan.ec>
@ryancragun ryancragun force-pushed the ryan/dont-clobber-caller-checkout-dir branch from dd0c28d to f8956bc Compare May 9, 2024 21:25
@ryancragun ryancragun changed the title package: support relative paths from callers package: fix relative paths and embedded composite actions May 9, 2024
@ryancragun
Copy link
Contributor Author

ryancragun commented May 9, 2024

Copy link
Contributor

@shore shore left a comment

Choose a reason for hiding this comment

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

LGTM!

action.yml Outdated
Comment on lines 222 to 225
if ! nfpm package -f "$config_file" -p ${1} -t ./out/; then
printf "failed to create package with nfpm for $1 using config $(cat $config_file)\n"
exit 1
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I don't think it's helpful to dump the config file a second time, but I do think it's helpful to always dump it. Maybe remove the conditional and let nfpm's non-zero exit directly halt the script and job?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that was an artifact of me debugging and I missed taking it out!

Signed-off-by: Ryan Cragun <me@ryan.ec>
Copy link
Contributor

@shore shore left a comment

Choose a reason for hiding this comment

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

:shipit:

@ryancragun ryancragun merged commit 33f7d23 into main May 9, 2024
5 checks passed
@ryancragun ryancragun deleted the ryan/dont-clobber-caller-checkout-dir branch May 9, 2024 22:09
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