Skip to content

ci(workflows): harden update workflows - #215

Merged
sheeeng merged 9 commits into
unstablefrom
chore/ci-harden-update-workflows
Aug 26, 2026
Merged

sheeeng merged 9 commits into
unstablefrom
chore/ci-harden-update-workflows

Conversation

@sheeeng

@sheeeng sheeeng commented Aug 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Hardens the three update workflows to enforce the unstable environment
unconditionally and fix several correctness issues.

  • Set environment.name to unstable unconditionally. The previous
    conditional expression could bypass environment protection when
    triggered from a non-default ref.
  • Fix nixpkgs-keys to nixpkgs only. nixpkgs-unstable is the
    channel the input follows, not a separate flake input name.
  • Add NIX_FLAKE_CHECKER_NO_TELEMETRY: "true" as an environment
    variable override. At flake-checker-action v13 commit de924abd,
    send-statistics: false maps to NIX_FLAKE_CHECKER_NO_TELEMETRY=false.
    The environment variable override is required to disable telemetry. See
    DeterminateSystems/flake-checker-action#134.
  • Add persist-credentials: false and fetch-depth: 0 on checkout.
  • Push via https://x-access-token URL so commits use the App identity
    and trigger downstream workflows.
  • Split gh pr create from the number lookup. The create subcommand
    does not support --json or --jq; use
    gh pr view "${branch}" --json number --jq '.number' to retrieve the
    number after creation.
  • Change --base main to --base unstable in PR creation calls.
  • Replace git switch --create with git switch --force-create.
  • Add nix flake check after nix flake update in the
    update-nix-flake-lock script.
  • Fix the Display Pull Request Link step: both expressions now reference
    steps.update-nix-flake-lock instead of steps.update-flake-lock.
  • Add concurrency.cancel-in-progress: false to serialize concurrent
    scheduled and manual runs and prevent PR creation races.

Make the `unstable` environment unconditional in all three update
workflows so branch protection always applies, even on manual
triggers from other refs.

- Set `environment.name` to `unstable` unconditionally; the previous
  conditional expression could bypass the environment when triggered
  from a non-default ref.
- Fix `nixpkgs-keys` to use `nixpkgs` only; `nixpkgs-unstable` is
  the channel the input follows, not a separate flake input name.
- Add `NIX_FLAKE_CHECKER_NO_TELEMETRY: "true"` env var; at the
  pinned v13 SHA, `send-statistics: false` maps to `=false`, not
  `=true`, so the env override is required to suppress telemetry.
- Add `persist-credentials: false` and `fetch-depth: 0` on checkout;
  prevents the default `GITHUB_TOKEN` from being stored in git config
  so that subsequent pushes must use the explicit App token URL.
- Push via `https://x-access-token` URL in update scripts so commits
  use the GitHub App identity and trigger downstream workflows.
- Use `--json number --jq '.number'` in `gh pr create`; removes
  fragile URL stripping with `##*/`.
- Change `--base main` to `--base unstable` in PR creation calls.
- Replace `git switch --create` with `git switch --force-create` so
  repeated runs succeed when the branch already exists.
- Add `nix flake check` after `nix flake update` in the
  update-nix-flake-lock script to validate the flake before commit.
- Fix Display Pull Request Link step: both expressions now reference
  `steps.update-nix-flake-lock` instead of `steps.update-flake-lock`.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unsupported GitHub CLI flags break pull request creation, and one workflow still uses the default GitHub token.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Hardens automated dependency-update workflows and standardizes updates against unstable.

Changes:

  • Enforces the protected environment and disables persisted credentials.
  • Uses App-authenticated pushes and validates Nix updates.
  • Corrects flake-checker and pull request handling configuration.
File summaries
File Description
.github/workflows/update-terraform-binary-version.yaml Hardens Terraform update automation.
.github/workflows/update-nix-flake-lock.yml Revises custom flake-lock updates.
.github/workflows/update-flake-lock.yml Hardens action-based flake updates.
Review details

Suppressed comments (4)

.github/workflows/update-terraform-binary-version.yaml:122

  • This base option only affects newly created pull requests. The earlier existing-pull-request path finds a pull request against any base and edits only its title and body, so an open updater pull request against main will remain there indefinitely. Also update the existing pull request's base to unstable.
              --base unstable \

.github/workflows/update-nix-flake-lock.yml:109

  • This base option only affects newly created pull requests. The existing-pull-request path accepts a pull request against any base and exits without changing it, so an open updater pull request against main will remain there indefinitely. Update its base to unstable before returning.
              --base unstable \

.github/workflows/update-nix-flake-lock.yml:112

  • gh pr create does not support --json or --jq, so the command exits with an unknown-flag error after the branch has been pushed and no pull request is created. Capture its URL, then query the number with gh pr view, which supports these formatting flags.
              --json number \
              --jq '.number'

.github/workflows/update-terraform-binary-version.yaml:125

  • gh pr create does not support --json or --jq, so the command exits with an unknown-flag error after the branch has been pushed and no pull request is created. Capture its URL, then query the number with gh pr view, which supports these formatting flags.
              --json number \
              --jq '.number'
  • Files reviewed: 3/3 changed files
  • Comments generated: 5
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/update-flake-lock.yml Resolved
Serialize concurrent runs with a workflow-level concurrency group so
that scheduled and manually dispatched runs cannot race to create
duplicate pull requests. `cancel-in-progress: false` queues the
incoming run rather than cancelling the in-progress one, which
prevents losing a partially applied update.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>
@sheeeng
sheeeng marked this pull request as draft August 26, 2026 13:05
- Pin checkout to `ref: unstable` in the custom-script workflows so
  that a manual dispatch from a non-default ref still updates the
  correct base and does not include unrelated commits in the PR diff.
- Change `git push --force` to `git push --force-with-lease` to
  prevent silently overwriting a concurrent push to the same branch.
- Pass `token: \${{ steps.create-github-app-token.outputs.token }}`
  to the `determinatesystems/update-flake-lock` action; the action
  defaults to `github.token`, which suppresses downstream workflow
  events on the resulting commits and pull requests.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>
Split `gh pr create` from the number lookup. The `create`
subcommand does not support `--json` or `--jq`; pass those
flags to `gh pr view "${branch}" --json number --jq '.number'`
instead.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>
Add an inline comment to each flake-checker-action step explaining
that at v13 commit de924abd, send-statistics: false maps to
NIX_FLAKE_CHECKER_NO_TELEMETRY=false. The environment variable
override is required to disable telemetry.

See DeterminateSystems/flake-checker-action#134.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

One workflow can still target another branch, and existing automation pull requests remain based on main.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 3
  • Review effort level: Balanced

Comment thread .github/workflows/update-flake-lock.yml Resolved
Pin `ref: unstable` on the `update-flake-lock` checkout so a
manual dispatch from any branch still operates on `unstable`.

Retarget existing automation pull requests to `unstable` before
exiting the existing-PR path. Without this, any open pull request
created by the previous workflow remains on `main` indefinitely.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>
Use the default job token for determinate-nix-action instead of the
App token. The action writes the supplied token into Nix configuration,
exposing write credentials to flake evaluation unnecessarily.

Guard each Display Pull Request Link step with an if condition so it
skips when no pull request number was produced.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Raw push URLs prevent the lease from using fetched remote-tracking state in two workflows.

Review details

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

.github/workflows/update-nix-flake-lock.yml:100

  • Passing a raw URL prevents bare --force-with-lease from using origin's remote-tracking ref. When this automation branch already exists, the update push can be rejected as stale instead of refreshing the pull request. Configure the authenticated URL as origin's push URL and push through the named remote so the lease compares against the branch fetched by checkout.
          git push --force-with-lease \
            "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git" \
            "${branch}"

.github/workflows/update-terraform-binary-version.yaml:110

  • Passing a raw URL prevents bare --force-with-lease from using origin's remote-tracking ref. When this automation branch already exists, the update push can be rejected as stale instead of refreshing the pull request. Configure the authenticated URL as origin's push URL and push through the named remote so the lease compares against the branch fetched by checkout.
          git push --force-with-lease \
            "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git" \
            "${branch}"
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Set the authenticated HTTPS push URL on `origin` before pushing,
then push through the named remote. Passing a raw URL to
`git push --force-with-lease` bypasses `origin`'s remote-tracking
ref, so the lease comparison is incorrect when the automation
branch already exists on the remote.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The workflows consistently target unstable, protect concurrent updates, validate changes, and use the intended App identity.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Rename the top-level workflow name from "Update Terraform Binary"
to "Update Terraform Binary Version" to match the job and step
names already in the file.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The workflow changes consistently address the stated security and correctness issues without unresolved defects.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@sheeeng
sheeeng marked this pull request as ready for review August 26, 2026 18:35
@sheeeng
sheeeng merged commit 095e207 into unstable Aug 26, 2026
11 checks passed
@sheeeng
sheeeng deleted the chore/ci-harden-update-workflows branch August 26, 2026 18:35
sheeeng added a commit that referenced this pull request Aug 29, 2026
* ci(workflows): harden update workflows

Make the `unstable` environment unconditional in all three update
workflows so branch protection always applies, even on manual
triggers from other refs.

- Set `environment.name` to `unstable` unconditionally; the previous
  conditional expression could bypass the environment when triggered
  from a non-default ref.
- Fix `nixpkgs-keys` to use `nixpkgs` only; `nixpkgs-unstable` is
  the channel the input follows, not a separate flake input name.
- Add `NIX_FLAKE_CHECKER_NO_TELEMETRY: "true"` env var; at the
  pinned v13 SHA, `send-statistics: false` maps to `=false`, not
  `=true`, so the env override is required to suppress telemetry.
- Add `persist-credentials: false` and `fetch-depth: 0` on checkout;
  prevents the default `GITHUB_TOKEN` from being stored in git config
  so that subsequent pushes must use the explicit App token URL.
- Push via `https://x-access-token` URL in update scripts so commits
  use the GitHub App identity and trigger downstream workflows.
- Use `--json number --jq '.number'` in `gh pr create`; removes
  fragile URL stripping with `##*/`.
- Change `--base main` to `--base unstable` in PR creation calls.
- Replace `git switch --create` with `git switch --force-create` so
  repeated runs succeed when the branch already exists.
- Add `nix flake check` after `nix flake update` in the
  update-nix-flake-lock script to validate the flake before commit.
- Fix Display Pull Request Link step: both expressions now reference
  `steps.update-nix-flake-lock` instead of `steps.update-flake-lock`.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): add workflow concurrency group

Serialize concurrent runs with a workflow-level concurrency group so
that scheduled and manually dispatched runs cannot race to create
duplicate pull requests. `cancel-in-progress: false` queues the
incoming run rather than cancelling the in-progress one, which
prevents losing a partially applied update.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): address pr review comments

- Pin checkout to `ref: unstable` in the custom-script workflows so
  that a manual dispatch from a non-default ref still updates the
  correct base and does not include unrelated commits in the PR diff.
- Change `git push --force` to `git push --force-with-lease` to
  prevent silently overwriting a concurrent push to the same branch.
- Pass `token: \${{ steps.create-github-app-token.outputs.token }}`
  to the `determinatesystems/update-flake-lock` action; the action
  defaults to `github.token`, which suppresses downstream workflow
  events on the resulting commits and pull requests.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): fix gh pr create flags

Split `gh pr create` from the number lookup. The `create`
subcommand does not support `--json` or `--jq`; pass those
flags to `gh pr view "${branch}" --json number --jq '.number'`
instead.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): document flake-checker-action telemetry bug

Add an inline comment to each flake-checker-action step explaining
that at v13 commit de924abd, send-statistics: false maps to
NIX_FLAKE_CHECKER_NO_TELEMETRY=false. The environment variable
override is required to disable telemetry.

See DeterminateSystems/flake-checker-action#134.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): pin checkout and retarget prs

Pin `ref: unstable` on the `update-flake-lock` checkout so a
manual dispatch from any branch still operates on `unstable`.

Retarget existing automation pull requests to `unstable` before
exiting the existing-PR path. Without this, any open pull request
created by the previous workflow remains on `main` indefinitely.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): fix determinate-nix-action token and display step

Use the default job token for determinate-nix-action instead of the
App token. The action writes the supplied token into Nix configuration,
exposing write credentials to flake evaluation unnecessarily.

Guard each Display Pull Request Link step with an if condition so it
skips when no pull request number was produced.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): push via origin for lease check

Set the authenticated HTTPS push URL on `origin` before pushing,
then push through the named remote. Passing a raw URL to
`git push --force-with-lease` bypasses `origin`'s remote-tracking
ref, so the lease comparison is incorrect when the automation
branch already exists on the remote.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): rename update terraform binary workflow

Rename the top-level workflow name from "Update Terraform Binary"
to "Update Terraform Binary Version" to match the job and step
names already in the file.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

---------

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>
sheeeng added a commit that referenced this pull request Aug 29, 2026
* ci(workflows): harden update workflows

Make the `unstable` environment unconditional in all three update
workflows so branch protection always applies, even on manual
triggers from other refs.

- Set `environment.name` to `unstable` unconditionally; the previous
  conditional expression could bypass the environment when triggered
  from a non-default ref.
- Fix `nixpkgs-keys` to use `nixpkgs` only; `nixpkgs-unstable` is
  the channel the input follows, not a separate flake input name.
- Add `NIX_FLAKE_CHECKER_NO_TELEMETRY: "true"` env var; at the
  pinned v13 SHA, `send-statistics: false` maps to `=false`, not
  `=true`, so the env override is required to suppress telemetry.
- Add `persist-credentials: false` and `fetch-depth: 0` on checkout;
  prevents the default `GITHUB_TOKEN` from being stored in git config
  so that subsequent pushes must use the explicit App token URL.
- Push via `https://x-access-token` URL in update scripts so commits
  use the GitHub App identity and trigger downstream workflows.
- Use `--json number --jq '.number'` in `gh pr create`; removes
  fragile URL stripping with `##*/`.
- Change `--base main` to `--base unstable` in PR creation calls.
- Replace `git switch --create` with `git switch --force-create` so
  repeated runs succeed when the branch already exists.
- Add `nix flake check` after `nix flake update` in the
  update-nix-flake-lock script to validate the flake before commit.
- Fix Display Pull Request Link step: both expressions now reference
  `steps.update-nix-flake-lock` instead of `steps.update-flake-lock`.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): add workflow concurrency group

Serialize concurrent runs with a workflow-level concurrency group so
that scheduled and manually dispatched runs cannot race to create
duplicate pull requests. `cancel-in-progress: false` queues the
incoming run rather than cancelling the in-progress one, which
prevents losing a partially applied update.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): address pr review comments

- Pin checkout to `ref: unstable` in the custom-script workflows so
  that a manual dispatch from a non-default ref still updates the
  correct base and does not include unrelated commits in the PR diff.
- Change `git push --force` to `git push --force-with-lease` to
  prevent silently overwriting a concurrent push to the same branch.
- Pass `token: \${{ steps.create-github-app-token.outputs.token }}`
  to the `determinatesystems/update-flake-lock` action; the action
  defaults to `github.token`, which suppresses downstream workflow
  events on the resulting commits and pull requests.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): fix gh pr create flags

Split `gh pr create` from the number lookup. The `create`
subcommand does not support `--json` or `--jq`; pass those
flags to `gh pr view "${branch}" --json number --jq '.number'`
instead.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): document flake-checker-action telemetry bug

Add an inline comment to each flake-checker-action step explaining
that at v13 commit de924abd, send-statistics: false maps to
NIX_FLAKE_CHECKER_NO_TELEMETRY=false. The environment variable
override is required to disable telemetry.

See DeterminateSystems/flake-checker-action#134.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): pin checkout and retarget prs

Pin `ref: unstable` on the `update-flake-lock` checkout so a
manual dispatch from any branch still operates on `unstable`.

Retarget existing automation pull requests to `unstable` before
exiting the existing-PR path. Without this, any open pull request
created by the previous workflow remains on `main` indefinitely.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): fix determinate-nix-action token and display step

Use the default job token for determinate-nix-action instead of the
App token. The action writes the supplied token into Nix configuration,
exposing write credentials to flake evaluation unnecessarily.

Guard each Display Pull Request Link step with an if condition so it
skips when no pull request number was produced.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): push via origin for lease check

Set the authenticated HTTPS push URL on `origin` before pushing,
then push through the named remote. Passing a raw URL to
`git push --force-with-lease` bypasses `origin`'s remote-tracking
ref, so the lease comparison is incorrect when the automation
branch already exists on the remote.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): rename update terraform binary workflow

Rename the top-level workflow name from "Update Terraform Binary"
to "Update Terraform Binary Version" to match the job and step
names already in the file.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

---------

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>
sheeeng added a commit that referenced this pull request Sep 10, 2026
* ci(workflows): harden update workflows

Make the `unstable` environment unconditional in all three update
workflows so branch protection always applies, even on manual
triggers from other refs.

- Set `environment.name` to `unstable` unconditionally; the previous
  conditional expression could bypass the environment when triggered
  from a non-default ref.
- Fix `nixpkgs-keys` to use `nixpkgs` only; `nixpkgs-unstable` is
  the channel the input follows, not a separate flake input name.
- Add `NIX_FLAKE_CHECKER_NO_TELEMETRY: "true"` env var; at the
  pinned v13 SHA, `send-statistics: false` maps to `=false`, not
  `=true`, so the env override is required to suppress telemetry.
- Add `persist-credentials: false` and `fetch-depth: 0` on checkout;
  prevents the default `GITHUB_TOKEN` from being stored in git config
  so that subsequent pushes must use the explicit App token URL.
- Push via `https://x-access-token` URL in update scripts so commits
  use the GitHub App identity and trigger downstream workflows.
- Use `--json number --jq '.number'` in `gh pr create`; removes
  fragile URL stripping with `##*/`.
- Change `--base main` to `--base unstable` in PR creation calls.
- Replace `git switch --create` with `git switch --force-create` so
  repeated runs succeed when the branch already exists.
- Add `nix flake check` after `nix flake update` in the
  update-nix-flake-lock script to validate the flake before commit.
- Fix Display Pull Request Link step: both expressions now reference
  `steps.update-nix-flake-lock` instead of `steps.update-flake-lock`.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): add workflow concurrency group

Serialize concurrent runs with a workflow-level concurrency group so
that scheduled and manually dispatched runs cannot race to create
duplicate pull requests. `cancel-in-progress: false` queues the
incoming run rather than cancelling the in-progress one, which
prevents losing a partially applied update.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): address pr review comments

- Pin checkout to `ref: unstable` in the custom-script workflows so
  that a manual dispatch from a non-default ref still updates the
  correct base and does not include unrelated commits in the PR diff.
- Change `git push --force` to `git push --force-with-lease` to
  prevent silently overwriting a concurrent push to the same branch.
- Pass `token: \${{ steps.create-github-app-token.outputs.token }}`
  to the `determinatesystems/update-flake-lock` action; the action
  defaults to `github.token`, which suppresses downstream workflow
  events on the resulting commits and pull requests.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): fix gh pr create flags

Split `gh pr create` from the number lookup. The `create`
subcommand does not support `--json` or `--jq`; pass those
flags to `gh pr view "${branch}" --json number --jq '.number'`
instead.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): document flake-checker-action telemetry bug

Add an inline comment to each flake-checker-action step explaining
that at v13 commit de924abd, send-statistics: false maps to
NIX_FLAKE_CHECKER_NO_TELEMETRY=false. The environment variable
override is required to disable telemetry.

See DeterminateSystems/flake-checker-action#134.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): pin checkout and retarget prs

Pin `ref: unstable` on the `update-flake-lock` checkout so a
manual dispatch from any branch still operates on `unstable`.

Retarget existing automation pull requests to `unstable` before
exiting the existing-PR path. Without this, any open pull request
created by the previous workflow remains on `main` indefinitely.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): fix determinate-nix-action token and display step

Use the default job token for determinate-nix-action instead of the
App token. The action writes the supplied token into Nix configuration,
exposing write credentials to flake evaluation unnecessarily.

Guard each Display Pull Request Link step with an if condition so it
skips when no pull request number was produced.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): push via origin for lease check

Set the authenticated HTTPS push URL on `origin` before pushing,
then push through the named remote. Passing a raw URL to
`git push --force-with-lease` bypasses `origin`'s remote-tracking
ref, so the lease comparison is incorrect when the automation
branch already exists on the remote.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

* ci(workflows): rename update terraform binary workflow

Rename the top-level workflow name from "Update Terraform Binary"
to "Update Terraform Binary Version" to match the job and step
names already in the file.

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>

---------

Signed-off-by: Leonard Sheng Sheng Lee <[email protected]>
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