|
| 1 | +version: 2 |
| 2 | + |
| 3 | +project_name: github-runner |
| 4 | + |
| 5 | +before: |
| 6 | + hooks: |
| 7 | + - go mod tidy |
| 8 | + - go generate ./... |
| 9 | + |
| 10 | +builds: |
| 11 | + - id: github-runner |
| 12 | + main: ./cmd/github-runner |
| 13 | + binary: github-runner |
| 14 | + env: |
| 15 | + - CGO_ENABLED=0 |
| 16 | + goos: |
| 17 | + - linux |
| 18 | + - darwin |
| 19 | + goarch: |
| 20 | + - amd64 |
| 21 | + - arm64 |
| 22 | + ldflags: |
| 23 | + - -s -w |
| 24 | + - -X github.com/org/github-runner/internal/version.Version={{.Version}} |
| 25 | + - -X github.com/org/github-runner/internal/version.Commit={{.Commit}} |
| 26 | + - -X github.com/org/github-runner/internal/version.Date={{.Date}} |
| 27 | + |
| 28 | +archives: |
| 29 | + - id: default |
| 30 | + format: tar.gz |
| 31 | + format_overrides: |
| 32 | + - goos: darwin |
| 33 | + format: zip |
| 34 | + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" |
| 35 | + files: |
| 36 | + - README.md |
| 37 | + - LICENSE |
| 38 | + - configs/config.example.toml |
| 39 | + - scripts/github-runner.service |
| 40 | + - scripts/completions/* |
| 41 | + |
| 42 | +checksum: |
| 43 | + name_template: "checksums.txt" |
| 44 | + algorithm: sha256 |
| 45 | + |
| 46 | +changelog: |
| 47 | + sort: asc |
| 48 | + filters: |
| 49 | + exclude: |
| 50 | + - "^docs:" |
| 51 | + - "^test:" |
| 52 | + - "^ci:" |
| 53 | + - "^chore:" |
| 54 | + |
| 55 | +brews: |
| 56 | + - repository: |
| 57 | + owner: org |
| 58 | + name: homebrew-tap |
| 59 | + directory: Formula |
| 60 | + homepage: "https://github.com/org/github-runner" |
| 61 | + description: "Self-hosted GitHub Actions runner" |
| 62 | + license: "MIT" |
| 63 | + install: | |
| 64 | + bin.install "github-runner" |
| 65 | + etc.install "configs/config.example.toml" => "github-runner/config.toml" |
| 66 | + (var/"github-runner").mkpath |
| 67 | + (var/"log").mkpath |
| 68 | + bash_completion.install "scripts/completions/github-runner.bash" => "github-runner" |
| 69 | + zsh_completion.install "scripts/completions/github-runner.zsh" => "_github-runner" |
| 70 | + fish_completion.install "scripts/completions/github-runner.fish" |
| 71 | + test: | |
| 72 | + system "#{bin}/github-runner", "version" |
| 73 | + service: | |
| 74 | + run [opt_bin/"github-runner", "start", "--config", etc/"github-runner/config.toml"] |
| 75 | + keep_alive true |
| 76 | + log_path var/"log/github-runner.log" |
| 77 | + error_log_path var/"log/github-runner.log" |
| 78 | + working_dir var/"github-runner" |
| 79 | +
|
| 80 | +dockers: |
| 81 | + - image_templates: |
| 82 | + - "ghcr.io/org/github-runner:{{ .Version }}-amd64" |
| 83 | + use: buildx |
| 84 | + build_flag_templates: |
| 85 | + - "--platform=linux/amd64" |
| 86 | + - "--build-arg=VERSION={{.Version}}" |
| 87 | + - "--build-arg=COMMIT={{.Commit}}" |
| 88 | + - "--build-arg=DATE={{.Date}}" |
| 89 | + dockerfile: Dockerfile |
| 90 | + goos: linux |
| 91 | + goarch: amd64 |
| 92 | + |
| 93 | + - image_templates: |
| 94 | + - "ghcr.io/org/github-runner:{{ .Version }}-arm64" |
| 95 | + use: buildx |
| 96 | + build_flag_templates: |
| 97 | + - "--platform=linux/arm64" |
| 98 | + - "--build-arg=VERSION={{.Version}}" |
| 99 | + - "--build-arg=COMMIT={{.Commit}}" |
| 100 | + - "--build-arg=DATE={{.Date}}" |
| 101 | + dockerfile: Dockerfile |
| 102 | + goos: linux |
| 103 | + goarch: arm64 |
| 104 | + |
| 105 | +docker_manifests: |
| 106 | + - name_template: "ghcr.io/org/github-runner:{{ .Version }}" |
| 107 | + image_templates: |
| 108 | + - "ghcr.io/org/github-runner:{{ .Version }}-amd64" |
| 109 | + - "ghcr.io/org/github-runner:{{ .Version }}-arm64" |
| 110 | + - name_template: "ghcr.io/org/github-runner:latest" |
| 111 | + image_templates: |
| 112 | + - "ghcr.io/org/github-runner:{{ .Version }}-amd64" |
| 113 | + - "ghcr.io/org/github-runner:{{ .Version }}-arm64" |
0 commit comments