Skip to content

Support invoking the action twice in the same job#251

Merged
pietern merged 5 commits into
mainfrom
run-action-twice
Jun 15, 2026
Merged

Support invoking the action twice in the same job#251
pietern merged 5 commits into
mainfrom
run-action-twice

Conversation

@pietern

@pietern pietern commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Calling the action twice in one job failed: both runs shared $RUNNER_TEMP/.bin, so the second unzip hit a non-interactive overwrite prompt and exited 1.

Each invocation now downloads into its own mktemp -d "$RUNNER_TEMP/databricks.XXXXXX" dir. A unique per-invocation dir keeps us fully isolated from other actions sharing $RUNNER_TEMP, and lets repeated calls coexist without deleting anything.

  • setup_release.sh / setup_snapshot.sh: unique temp dir per invocation.
  • test.yml: new action_twice job (macOS/Ubuntu/Windows) invokes the action twice and asserts version + clean tree.

Closes #186
Closes #136

This pull request and its description were written by Isaac.

pietern added 4 commits June 15, 2026 15:39
Calling the action twice in one job failed: both runs shared
$RUNNER_TEMP/.bin, so the second unzip hit a non-interactive overwrite
prompt and exited 1.

Each invocation now downloads into its own mktemp -d
"$RUNNER_TEMP/databricks.XXXXXX" dir. A unique per-invocation dir keeps
us fully isolated from other actions sharing $RUNNER_TEMP, and lets
repeated calls coexist without deleting anything.

Co-authored-by: Isaac
Cite the Variables reference, which documents that $RUNNER_TEMP is
emptied at the beginning and end of each job -- explaining why the
per-invocation directories need no manual cleanup.

Co-authored-by: Isaac

@simonfaltum simonfaltum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved. I reviewed the release and snapshot installer changes and did not find any blocking issues.

Verification:

  • Ran bash -n setup_release.sh setup_snapshot.sh locally.
  • Checked PR status with gh pr checks 251 --repo databricks/setup-cli; all checks passed.
  • Confirmed the new action_twice matrix passed on macOS, Ubuntu, and Windows.
  • Confirmed CI shellcheck passed; local shellcheck is not installed on this machine, so I relied on the GitHub check for that.

Drop the gh-run-download/Windows-rename aside from the snapshot comment
and fold the $RUNNER_TEMP cleanup note back into the main paragraph in
both scripts.

Co-authored-by: Isaac
@pietern pietern merged commit 3db390e into main Jun 15, 2026
19 checks passed
@pietern pietern deleted the run-action-twice branch June 15, 2026 14:42
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.

CHANGELOG.md cannot be overwritten in quite mode Error installing Databricks CLI via github action

2 participants