hashicorp / setup-packer

Run HashiCorp Packer as part of your GitHub Actions Workflow
https://github.com/marketplace/actions/setup-hashicorp-packer
Apache License 2.0
139 stars 83 forks source link

Broken github action for latest ? #118

Open laluka opened 1 month ago

laluka commented 1 month ago

Hello there, I maintain the LaluBuntu linux distro (offensive work), and it's relying on packer & github actions for daily builds (docker mostly). We live on latest as it's a rolling distro, and this morning, things broke in the latest github action, any chance you could have a look ? :) Cheers ! 🌹

Expected Behavior

packer version should work :)

Current Behavior

packer version doesn't work anymore :(

image

Steps to Reproduce

Simply add the packer setup workflow

[...]
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup `packer`
        uses: hashicorp/setup-packer@main
        id: setup
        env:
          PACKER_LOG: "0"
          PRODUCT_VERSION: latest

Environment

Have a nice day ! 🌈

ksatirli commented 1 month ago

Thanks for reporting this, @laluka!

I tried to replicate this, because the error message is a bit confusing.

Here's my workflow output: https://github.com/ksatirli/packer-test/actions/runs/10179709241/job/28156033146

And here's the associated workflow: https://github.com/ksatirli/packer-test/blob/main/.github/workflows/packer-main.yml

I think the problem is that you're attempting to write to an out location that doesn't exist (as listed in your screenshot), but I'm unable to replicate this easily.

Can you provide more information?

laluka commented 1 month ago

Well, that's... Unexpected! So, my report wasn't full, I thought the command failed as packer wasn't in the current PATH, but it actually is, the missing part was...

image

Now I wonder why github-action broke this behavior, as writing to stdout isn't too scary.. 🤷

It works on my end with a regular file, would you mind trying with /dev/stdout to see if this can still be reproduced ?

Thanks for the quick response, and have a nice day ! 🌹