All checks were successful
Release / build (amd64, linux) (push) Successful in 1m15s
CI / build-and-test (push) Successful in 1m7s
Release / build (amd64, windows) (push) Successful in 1m3s
Release / build (amd64, darwin) (push) Successful in 1m8s
Release / build (arm64, darwin) (push) Successful in 46s
Release / build (arm64, linux) (push) Successful in 50s
Release / release (push) Successful in 26s
- Update module path: gitea.com/gitea/act_runner → git.marketally.com/gitcaddy/gitcaddy-runner - Update all import paths across Go source files - Update Makefile LDFLAGS and package references - Update .goreleaser.yaml ldflags and S3 directory path - Add comprehensive README with capacity configuration documentation - Document troubleshooting for capacity feature and Docker detection - Bump version to v1.0.0 for major rebrand - All linting checks passed (fmt-check, go mod tidy, go vet)
39 lines
985 B
Go
39 lines
985 B
Go
// Copyright 2026 MarketAlly. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"os"
|
|
|
|
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/artifact"
|
|
)
|
|
|
|
func main() {
|
|
url := flag.String("url", "", "Upload URL")
|
|
token := flag.String("token", "", "Auth token")
|
|
file := flag.String("file", "", "File to upload")
|
|
retries := flag.Int("retries", 5, "Maximum retry attempts")
|
|
flag.Parse()
|
|
|
|
if *url == "" || *token == "" || *file == "" {
|
|
fmt.Fprintf(os.Stderr, "GitCaddy Upload Helper - Reliable file uploads with retry\n\n")
|
|
fmt.Fprintf(os.Stderr, "Usage: gitcaddy-upload -url URL -token TOKEN -file FILE\n\n")
|
|
fmt.Fprintf(os.Stderr, "Options:\n")
|
|
flag.PrintDefaults()
|
|
os.Exit(1)
|
|
}
|
|
|
|
helper := artifact.NewUploadHelper()
|
|
helper.MaxRetries = *retries
|
|
|
|
if err := helper.UploadWithRetry(*url, *token, *file); err != nil {
|
|
fmt.Fprintf(os.Stderr, "Upload failed: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
fmt.Println("Upload succeeded!")
|
|
}
|