CI: Fix release-npm-packages action (#77127)

* Remove dependency of NpmReleaseAction to the git binary

* Switch to using the node image for the release-npm-packages step
This commit is contained in:
Horst Gutmann 2023-10-27 09:20:20 +02:00 committed by GitHub
parent 1b6d39f823
commit aa9fc3be72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 10 deletions

View File

@ -2711,7 +2711,7 @@ steps:
NPM_TOKEN:
from_secret: npm_token
failure: ignore
image: golang:1.20.10-alpine
image: node:20.9.0-alpine
name: release-npm-packages
trigger:
event:
@ -4668,6 +4668,6 @@ kind: secret
name: gcr_credentials
---
kind: signature
hmac: 4c04040e7890d9f1da64ff3e2c006db1b3de4276b57ce4401849ec4ceb665ea8
hmac: 2a51cf7ded5c749dc6b3664e5cadc6378910e772bf44ea8c80457b5ddb61e3a5
...

View File

@ -3,7 +3,6 @@ package main
import (
"fmt"
"os"
"os/exec"
"strings"
"github.com/urfave/cli/v2"
@ -74,12 +73,6 @@ func NpmReleaseAction(c *cli.Context) error {
return fmt.Errorf("no tag version specified, exitting")
}
cmd := exec.Command("git", "checkout", ".")
if err := cmd.Run(); err != nil {
fmt.Println("command failed to run, err: ", err)
return err
}
err := npm.PublishNpmPackages(c.Context, tag)
if err != nil {
return err

View File

@ -62,7 +62,7 @@ def retrieve_npm_packages_step():
def release_npm_packages_step():
return {
"name": "release-npm-packages",
"image": images["go"],
"image": images["node"],
"depends_on": [
"compile-build-cmd",
"retrieve-npm-packages",