`Azure/static-web-apps-deploy@v1` is ambiguous: branch `v1` and tag `v1` point to different commits (breaks Actions lockfiles)

オープン
#1,818 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions
領域
release

調査の方向性

Start by inspecting the repository refs for Azure/static-web-apps-deploy, especially the v1 branch and tag, and compare the commits they identify. Decide which ref should define v1 and whether immutable SemVer tags can be published consistently. Done means the action resolves to one commit for v1 and users have an unambiguous way to pin releases.

索引モデルが issue の本文から書いたものです。

説明

Describe the bug

Azure/static-web-apps-deploy has both a branch and a tag named v1, and they point to different commits:

$ git ls-remote https://github.com/Azure/static-web-apps-deploy v1
4d27395796ac319302594769cfe812bd207490b1  refs/heads/v1   (2024-09-11)
1a947af9992250f3bc2e68ad0754c0b0c11566c9  refs/tags/v1    (2021-03-03)

The same applies to v0.0.1-preview: the branch points to 1a947af9, and the tag points to 920eddf8.

When a repository uses GitHub Actions workflow dependency lockfiles (public preview), uses: Azure/static-web-apps-deploy@v1 cannot be resolved. The job fails at "Set up job", before the deploy step runs:

##[error]Lockfile ref `v1` for `azure/static-web-apps-deploy` is ambiguous: a branch and a tag with that name point to different commits. lockfile verification did not produce a result for this action

Pinning the action to a commit SHA does not avoid this. gh actions-lock looks up the tag that points to the SHA and records ref: 'v1' in the lockfile, so the runner fails with the same error. When the lockfile is generated from scratch, gh actions-lock also rewrites @1a947af... in the workflow back to @v1.

This affects both the upload job and the close job of the default Static Web Apps workflow, so production deployments are blocked.

Also, the only tags in the repository are v0.0.1-preview and v1. There is no way to pin a specific release by tag.

To Reproduce
Steps to reproduce the behavior:

  1. Use the default Static Web Apps workflow (uses: Azure/static-web-apps-deploy@v1).
  2. Generate .github/workflows/actions.lock with gh actions-lock. The generated lockfile has an entry with ref: 'v1'.
  3. Trigger the workflow (push to the production branch, or open, update, or close a pull request).
  4. See the error above in "Set up job".

The same happens if step 1 uses Azure/static-web-apps-deploy@1a947af9992250f3bc2e68ad0754c0b0c11566c9.

Expected behavior
Azure/static-web-apps-deploy@v1 should resolve to a single commit. For example:

  1. Make v1 unambiguous, either by keeping only one ref named v1 or by keeping the branch and the tag on the same commit.
  2. Publish immutable SemVer tags/releases (e.g. v1.0.0, v1.1.0), so users can pin an exact version and lockfiles/Dependabot can track updates.

Additional context

主要言語
言語のデータがありません
スター
347
フォーク
68
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure/static-web-apps のほかの issue

Azure/static-web-apps の issue をすべて見る

似ている issue

Release の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。