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

Customizing CI panics if steps don't start with the name key #1739

Open
CramBL opened this issue Feb 1, 2025 · 0 comments
Open

Customizing CI panics if steps don't start with the name key #1739

CramBL opened this issue Feb 1, 2025 · 0 comments

Comments

@CramBL
Copy link
Contributor

CramBL commented Feb 1, 2025

Version: 0.28.0

Steps to reproduce

Set this in dist-workspace.toml:

[workspace]
members = ["cargo:."]

[dist]
cargo-dist-version = "0.28.0"
ci = "github"
installers = ["shell", "powershell", "msi"]
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
install-path = "CARGO_HOME"
install-updater = false
pr-run-mode = "upload"
github-build-setup = "build-setup.yml" # This is the relevant one

Then in .github/workflows/build-setup.yml:

- uses: extractions/setup-just@v2

Running dist init (just hitting enter a few times) panics with:

  x Failed to render template
  `-> Backtrace:
      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
       1: BaseThreadInitThunk
          at <unknown source file>
       2: RtlUserThreadStart
          at <unknown source file>

      undefined value (in ci/github/release.yml:238)
     ,-[238:19]
 237 |       {{%- for step in github_build_setup %}}
 238 |       - name: {{{ step.name }}}
     :                   ^^^^^^^^^
 239 |         {{%- if step.id is not undefined %}}
     `----
  help: this is a bug in dist, let us know and we'll fix it: https://github.com/axodotdev/cargo-dist/issues/new

If you add name as the first key .github/workflows/build-setup.yml:

- name: Install just
  uses: extractions/setup-just@v2

It runs with no issues.

Running actions like this is often done without a name because it can be noisy to name every little action step like checkout and rust-cache, so I think this should be fixed (although it's not urgent obviously).

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

No branches or pull requests

1 participant