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

Fix linux packaging step for workflow_call events #11601

Merged
merged 1 commit into from
Feb 26, 2022

Conversation

mdeggies
Copy link
Member

This PR should fix the linux packaging build failure happening within the nightly-release github actions workflow. A recent failure is available here: https://github.com/hashicorp/packer/runs/5341017655?check_suite_focus=true.

When the build workflow is called from the nightly-release workflow, ${{ github.event.repository.name }} evaluates to nothing because this value isn't available on the workflow_call event. This value should evaluate to packer, so we're just reusing the env var PKG_NAME to set that.


More detail:

If we look at a recent run from the build job triggered on a merge to master, https://github.com/hashicorp/packer/runs/5341305084?check_suite_focus=true, this shows the inputs to the linux packaging action:

Run hashicorp/actions-packaging-linux@v1
  with:
    name: packer
    description: HashiCorp Packer - A tool for creating identical machine images for multiple platforms from a single source configuration
    arch: arm
    version: 1.7.11-dev
    maintainer: HashiCorp
    homepage: https://www.packer.io/docs
    license: MPL-[2](https://github.com/hashicorp/packer/runs/5341305084?check_suite_focus=true#step:7:2).0
    binary: dist/packer
    deb_depends: openssl
    rpm_depends: openssl
    config_dir: .release/linux/package/
    preinstall: .release/linux/preinst
    postremove: .release/linux/postrm

On the failing job, the inputs look like this:

Run hashicorp/actions-packaging-linux@v1
  with:
    description: HashiCorp Packer - A tool for creating identical machine images for multiple platforms from a single source configuration
    arch: 386
    version: 1.7.11-dev
    maintainer: HashiCorp
    homepage: https://www.packer.io/docs
    license: MPL-[2](https://github.com/hashicorp/packer/runs/5341017655?check_suite_focus=true#step:7:2).0
    binary: dist/packer
    deb_depends: openssl
    rpm_depends: openssl
    config_dir: .release/linux/package/
    preinstall: .release/linux/preinst
    postremove: .release/linux/postrm

Notice the missing (required) name field.

@mdeggies mdeggies requested review from a team, shore, sarahethompson and nywilken and removed request for a team February 26, 2022 01:23
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for the detailed description.

@mdeggies mdeggies merged commit b4ea5cf into master Feb 26, 2022
@mdeggies mdeggies deleted the fix-linux-package-nightly branch February 26, 2022 01:29
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants