mirror of
https://gitea.com/gitea/act_runner.git
synced 2025-12-19 12:34:47 +00:00
chore: use node 20
This commit is contained in:
@@ -484,7 +484,7 @@ func loadExecCmd(ctx context.Context) *cobra.Command {
|
||||
execCmd.PersistentFlags().BoolVarP(&execArg.noSkipCheckout, "no-skip-checkout", "", false, "Do not skip actions/checkout")
|
||||
execCmd.PersistentFlags().BoolVarP(&execArg.debug, "debug", "d", false, "enable debug log")
|
||||
execCmd.PersistentFlags().BoolVarP(&execArg.dryrun, "dryrun", "n", false, "dryrun mode")
|
||||
execCmd.PersistentFlags().StringVarP(&execArg.image, "image", "i", "node:18-bookworm", "Docker image to use. Use \"-self-hosted\" to run directly on the host.")
|
||||
execCmd.PersistentFlags().StringVarP(&execArg.image, "image", "i", "node:20-bookworm", "Docker image to use. Use \"-self-hosted\" to run directly on the host.")
|
||||
execCmd.PersistentFlags().StringVarP(&execArg.network, "network", "", "", "Specify the network to which the container will connect")
|
||||
execCmd.PersistentFlags().StringVarP(&execArg.githubInstance, "gitea-instance", "", "", "Gitea instance to use.")
|
||||
|
||||
|
||||
@@ -90,11 +90,16 @@ const (
|
||||
StageExit
|
||||
)
|
||||
|
||||
/*
|
||||
ubuntu-18.04 -> bionic -> buster: https://git.launchpad.net/ubuntu/+source/base-files/tree/etc/debian_version?h=ubuntu/bionic
|
||||
ubuntu-20.04 -> focal -> bullseye: https://git.launchpad.net/ubuntu/+source/base-files/tree/etc/debian_version?h=ubuntu/focal
|
||||
ubuntu-22.04 -> jammy -> bookworm: https://git.launchpad.net/ubuntu/+source/base-files/tree/etc/debian_version?h=ubuntu/jammy
|
||||
*/
|
||||
var defaultLabels = []string{
|
||||
"ubuntu-latest:docker://node:18-bookworm",
|
||||
"ubuntu-22.04:docker://node:18-bookworm",
|
||||
"ubuntu-20.04:docker://node:18-bullseye",
|
||||
"ubuntu-18.04:docker://node:18-buster",
|
||||
"ubuntu-latest:docker://node:20-bookworm",
|
||||
"ubuntu-22.04:docker://node:20-bookworm",
|
||||
"ubuntu-20.04:docker://node:20-bullseye",
|
||||
"ubuntu-18.04:docker://node:20-buster",
|
||||
}
|
||||
|
||||
type registerInputs struct {
|
||||
@@ -179,7 +184,7 @@ func (r *registerInputs) assignToNext(stage registerStage, value string, cfg *co
|
||||
}
|
||||
|
||||
if validateLabels(r.Labels) != nil {
|
||||
log.Infoln("Invalid labels, please input again, leave blank to use the default labels (for example, docker://node:18-bookworm,ubuntu-22.04:docker://node:18-bookworm,ubuntu-20.04:docker://node:18-bullseye,ubuntu-18.04:docker://node:18-buster)")
|
||||
log.Infoln("Invalid labels, please input again, leave blank to use the default labels (for example, docker://node:20-bookworm,ubuntu-22.04:docker://node:20-bookworm,ubuntu-20.04:docker://node:20-bullseye,ubuntu-18.04:docker://node:20-buster)")
|
||||
return StageInputLabels
|
||||
}
|
||||
return StageWaitingForRegistration
|
||||
@@ -243,7 +248,7 @@ func printStageHelp(stage registerStage) {
|
||||
hostname, _ := os.Hostname()
|
||||
log.Infof("Enter the runner name (if set empty, use hostname: %s):\n", hostname)
|
||||
case StageInputLabels:
|
||||
log.Infoln("Enter the runner labels, leave blank to use the default labels (comma-separated, for example, docker://node:18-bookworm,ubuntu-22.04:docker://node:18-bookworm,ubuntu-20.04:docker://node:18-bullseye,ubuntu-18.04:docker://node:18-buster):")
|
||||
log.Infoln("Enter the runner labels, leave blank to use the default labels (comma-separated, for example, docker://node:20-bookworm,ubuntu-22.04:docker://node:20-bookworm,ubuntu-20.04:docker://node:20-bullseye,ubuntu-18.04:docker://node:20-buster):")
|
||||
case StageWaitingForRegistration:
|
||||
log.Infoln("Waiting for registration...")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user