Skip to content

Commit 225f545

Browse files
Copilotharupy
andauthored
Remove github.rest.git.updateRef for updating nightly tag (mlflow#17229)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
1 parent 811c68e commit 225f545

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

.github/scripts/src/snapshots.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -150,22 +150,6 @@ export async function uploadSnapshots({
150150
make_latest: "false" as const,
151151
};
152152

153-
// Always update the tag to point to the current commit
154-
console.log(`Updating nightly tag to point to commit: ${context.sha}`);
155-
try {
156-
await github.rest.git.updateRef({
157-
owner,
158-
repo,
159-
ref: `tags/${RELEASE_TAG}`,
160-
sha: context.sha,
161-
force: true,
162-
});
163-
console.log("Successfully updated nightly tag");
164-
} catch (error: any) {
165-
console.log(`Failed to update tag: ${error.message}`);
166-
// If tag update fails, we'll still proceed with release update/creation
167-
}
168-
169153
if (releaseExists) {
170154
console.log("Updating existing nightly release...");
171155
const { data: updatedRelease } = await github.rest.repos.updateRelease({

.github/workflows/snapshots.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
timeout-minutes: 30
2525
permissions:
26-
contents: write # Needed to push tags and create releases
26+
contents: write # Needed to create/update releases and manage assets
2727
steps:
2828
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2929
- uses: ./.github/actions/setup-python

0 commit comments

Comments
 (0)