This repository was archived by the owner on Jul 29, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (66 loc) · 3.51 KB
/
Copy pathrunner-release.yml
File metadata and controls
78 lines (66 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Runner Build and Release
on:
push:
tags:
- 'runner-v*.*.*'
- 'runner-v*.*.*-beta.*'
- 'runner-v*.*.*-alpha.*'
- 'runner-v*.*.*-rc.*'
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set release version
id: version
run: echo "value=${GITHUB_REF_NAME#runner-}" >> "$GITHUB_OUTPUT"
- name: Build Runner Docker Image (Stable)
if: ${{ !contains(github.ref_name, '-beta') && !contains(github.ref_name, '-alpha') && !contains(github.ref_name, '-rc') }}
run: docker build . --file apps/runner/Dockerfile --tag ghcr.io/justlabv1/runner:latest --tag ghcr.io/justlabv1/runner:${{ github.sha }} --tag ghcr.io/justlabv1/runner:${{ steps.version.outputs.value }}
- name: Build Runner Docker Image (Pre-release)
if: ${{ contains(github.ref_name, '-beta') || contains(github.ref_name, '-alpha') || contains(github.ref_name, '-rc') }}
run: docker build . --file apps/runner/Dockerfile --tag ghcr.io/justlabv1/runner:beta --tag ghcr.io/justlabv1/runner:${{ github.sha }} --tag ghcr.io/justlabv1/runner:${{ steps.version.outputs.value }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Docker Images (Stable)
if: ${{ !contains(github.ref_name, '-beta') && !contains(github.ref_name, '-alpha') && !contains(github.ref_name, '-rc') }}
run: |
docker push ghcr.io/justlabv1/runner:latest
docker push ghcr.io/justlabv1/runner:${{ github.sha }}
docker push ghcr.io/justlabv1/runner:${{ steps.version.outputs.value }}
- name: Push Docker Images (Pre-release)
if: ${{ contains(github.ref_name, '-beta') || contains(github.ref_name, '-alpha') || contains(github.ref_name, '-rc') }}
run: |
docker push ghcr.io/justlabv1/runner:beta
docker push ghcr.io/justlabv1/runner:${{ github.sha }}
docker push ghcr.io/justlabv1/runner:${{ steps.version.outputs.value }}
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.26.4'
- name: Build Runner Module
run: |
cd apps/runner
go build -v ./...
- name: Build Release Binaries
run: |
mkdir -p bin
cd apps/runner
GOOS=darwin GOARCH=amd64 go build -o ../../bin/runner-darwin-amd64 ./cmd/runner
GOOS=darwin GOARCH=arm64 go build -o ../../bin/runner-darwin-arm64 ./cmd/runner
GOOS=linux GOARCH=amd64 go build -o ../../bin/runner-linux-amd64 ./cmd/runner
- name: Create Release
uses: ncipollo/release-action@v1
with:
name: ${{ contains(steps.version.outputs.value, '-beta') && format('🚧 Beta Release {0}', steps.version.outputs.value) || contains(steps.version.outputs.value, '-alpha') && format('🔬 Alpha Release {0}', steps.version.outputs.value) || contains(steps.version.outputs.value, '-rc') && format('🎯 Release Candidate {0}', steps.version.outputs.value) || format('🚀 Release {0}', steps.version.outputs.value) }}
tag: ${{ github.ref_name }}
artifacts: 'bin/*'
skipIfReleaseExists: true
generateReleaseNotes: true
prerelease: ${{ contains(github.ref_name, '-beta') || contains(github.ref_name, '-alpha') || contains(github.ref_name, '-rc') }}