Skip to content

Commit bee9b07

Browse files
committed
chore: update workflow to use ubuntu-latest for job runners
1 parent 267e543 commit bee9b07

9 files changed

Lines changed: 37 additions & 26 deletions

File tree

.github/workflows/go-test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
build:
14-
runs-on: self-hosted
14+
runs-on: ${{ github.repository_owner == 'mogenius' && 'self-hosted' || 'ubuntu-latest' }}
1515

1616
steps:
1717
- name: Checkout code
@@ -28,10 +28,10 @@ jobs:
2828
2929
go mod download
3030
31-
go build ./...
31+
go build -tags timetzdata ./...
3232
test:
3333
needs: [build]
34-
runs-on: self-hosted
34+
runs-on: ${{ github.repository_owner == 'mogenius' && 'self-hosted' || 'ubuntu-latest' }}
3535

3636
steps:
3737
- name: Checkout code
@@ -50,7 +50,7 @@ jobs:
5050
5151
lint:
5252
needs: [build]
53-
runs-on: self-hosted
53+
runs-on: ${{ github.repository_owner == 'mogenius' && 'self-hosted' || 'ubuntu-latest' }}
5454
permissions:
5555
# Required: allow read access to the content for analysis.
5656
contents: read

.github/workflows/helm-lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
lint:
10-
runs-on: self-hosted
10+
runs-on: ${{ github.repository_owner == 'mogenius' && 'self-hosted' || 'ubuntu-latest' }}
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v5

.github/workflows/release.yaml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@ on:
44
push:
55
branches:
66
- main
7+
- develop
78

89
env:
9-
IMAGE_NAME: ghcr.io/mogenius/renovate-operator
10+
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/renovate-operator
1011
REGISTRY: ghcr.io
1112
DOCKERFILE: Dockerfile
1213
HELMNAME: "renovate-operator"
1314

1415
jobs:
1516
prepare:
16-
runs-on: [arc-runner-set-amd64]
17+
runs-on: ${{ github.repository_owner == 'mogenius' && fromJSON('["arc-runner-set-amd64"]') || 'ubuntu-latest' }}
1718
permissions:
1819
contents: write
1920
steps:
20-
- name: Generate a token
21+
- name: Generate a token (upstream only)
2122
id: generate-token
23+
if: ${{ github.repository == 'mogenius/renovate-operator' }}
2224
uses: actions/create-github-app-token@v2
2325
with:
2426
app-id: ${{ secrets.RELEASE_APP_ID }}
@@ -27,8 +29,8 @@ jobs:
2729
- name: Checkout repository
2830
uses: actions/checkout@v5
2931
with:
30-
ref: main
31-
token: ${{ steps.generate-token.outputs.token }}
32+
ref: ${{ github.ref }}
33+
token: ${{ steps.generate-token.outputs.token || github.token }}
3234
fetch-depth: 0
3335

3436
- uses: actions/setup-node@v6
@@ -39,15 +41,15 @@ jobs:
3941
id: semantic
4042
uses: cycjimmy/semantic-release-action@v4
4143
env:
42-
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
44+
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token || github.token }}
4345
outputs:
4446
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
4547

4648
build-and-push-docker:
4749
name: Build Multi-arch Docker
4850
needs: [prepare]
49-
if: needs.prepare.outputs.new_release_published == 'true'
50-
runs-on: [arc-runner-set-amd64]
51+
if: ${{ github.repository != 'mogenius/renovate-operator' || needs.prepare.outputs.new_release_published == 'true' }}
52+
runs-on: ${{ github.repository_owner == 'mogenius' && fromJSON('["arc-runner-set-amd64"]') || 'ubuntu-latest' }}
5153

5254
permissions:
5355
contents: read
@@ -56,7 +58,7 @@ jobs:
5658
- name: Checkout repository
5759
uses: actions/checkout@v5
5860
with:
59-
ref: main
61+
ref: ${{ github.ref }}
6062
fetch-depth: 0
6163

6264
- name: Set up QEMU
@@ -75,7 +77,7 @@ jobs:
7577
- name: Calculate version from git
7678
id: git_version
7779
run: |
78-
VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))
80+
VERSION=$(git describe --tags $(git rev-list --tags --max-count=1 2>/dev/null) || echo "dev")
7981
echo "version=$VERSION" >> $GITHUB_OUTPUT
8082
echo "📦 Calculated version: $VERSION"
8183
@@ -104,7 +106,7 @@ jobs:
104106
helm-chart:
105107
needs: [prepare, build-and-push-docker]
106108
if: needs.prepare.outputs.new_release_published == 'true'
107-
runs-on: [arc-runner-set-amd64]
109+
runs-on: ["arc-runner-set-amd64"]
108110
permissions:
109111
contents: write
110112
packages: write
@@ -120,7 +122,7 @@ jobs:
120122
- name: Check out code
121123
uses: actions/checkout@v5
122124
with:
123-
ref: main
125+
ref: ${{ github.ref }}
124126
fetch-depth: 0
125127
token: ${{ steps.generate-token.outputs.token }}
126128

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,12 @@ go.work.sum
3535
dist/
3636

3737
*.min.js
38+
39+
### macOS ###
40+
# General
41+
.DS_Store
42+
.AppleDouble
43+
.LSOverride
44+
45+
# Thumbnails
46+
._*

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ COPY src/go.mod src/go.sum ./
1313
RUN go mod download
1414
COPY src .
1515
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOARM=${TARGETVARIANT#v} \
16-
go build -trimpath -gcflags="all=-l" -ldflags="-s -w -X main.Version=${VERSION}" -o renovate-operator ./cmd/main.go
16+
go build -tags timetzdata -trimpath -gcflags="all=-l" -ldflags="-s -w -X main.Version=${VERSION}" -o renovate-operator ./cmd/main.go
1717

1818
FROM --platform=$BUILDPLATFORM alpine:latest as js-downloader
1919
WORKDIR /workspace

Justfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ run *args: build jsInstall
1414
build: generate
1515
#!/usr/bin/env sh
1616
VERSION=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "dev")
17-
cd src && go build -trimpath -gcflags="all=-l" -ldflags="-s -w -X main.Version=${VERSION}" -o ../dist/native/renovate-operator ./cmd/main.go
17+
cd src && go build -tags timetzdata -trimpath -gcflags="all=-l" -ldflags="-s -w -X main.Version=${VERSION}" -o ../dist/native/renovate-operator ./cmd/main.go
1818
1919
# Build binaries for all targets
2020
build-all: build-linux-amd64 build-linux-arm64 build-linux-armv7
2121

2222
# Build binary for target linux-amd64
2323
build-linux-amd64: generate
24-
cd src && GOOS=linux GOARCH=amd64 go build -trimpath -gcflags="all=-l" -ldflags="-s -w" -o ../dist/amd64/renovate-operator ./cmd/main.go
24+
cd src && GOOS=linux GOARCH=amd64 go build -tags timetzdata -trimpath -gcflags="all=-l" -ldflags="-s -w" -o ../dist/amd64/renovate-operator ./cmd/main.go
2525

2626
# Build docker image for target linux-amd64
2727
build-docker-linux-amd64:
@@ -37,7 +37,7 @@ build-docker-linux-amd64:
3737
3838
# Build binary for target linux-arm64
3939
build-linux-arm64: generate
40-
cd src && GOOS=linux GOARCH=arm64 go build -trimpath -gcflags="all=-l" -ldflags="-s -w" -o ../dist/arm64/renovate-operator ./cmd/main.go
40+
cd src && GOOS=linux GOARCH=arm64 go build -tags timetzdata -trimpath -gcflags="all=-l" -ldflags="-s -w" -o ../dist/arm64/renovate-operator ./cmd/main.go
4141

4242
# Build docker image for target linux-arm64
4343
build-docker-linux-arm64:
@@ -53,7 +53,7 @@ build-docker-linux-arm64:
5353
5454
# Build binary for target linux-armv7
5555
build-linux-armv7: generate
56-
cd src && GOOS=linux GOARCH=arm GOARM=7 go build -trimpath -gcflags="all=-l" -ldflags="-s -w" -o ../dist/armv7/renovate-operator ./cmd/main.go
56+
cd src && GOOS=linux GOARCH=arm GOARM=7 go build -tags timetzdata -trimpath -gcflags="all=-l" -ldflags="-s -w" -o ../dist/armv7/renovate-operator ./cmd/main.go
5757

5858
# Build docker image for target linux-armv7
5959
build-docker-linux-armv7:

src/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ require (
1212
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
1313
github.com/google/btree v1.1.3 // indirect
1414
github.com/kylelemons/godebug v1.1.0 // indirect
15+
github.com/netresearch/go-cron v0.13.0 // indirect
1516
github.com/pmezard/go-difflib v1.0.0 // indirect
1617
github.com/x448/float16 v0.8.4 // indirect
1718
go.yaml.in/yaml/v2 v2.4.3 // indirect
@@ -48,7 +49,6 @@ require (
4849
github.com/prometheus/client_model v0.6.2 // indirect
4950
github.com/prometheus/common v0.66.1 // indirect
5051
github.com/prometheus/procfs v0.16.1 // indirect
51-
github.com/robfig/cron/v3 v3.0.1
5252
github.com/spf13/pflag v1.0.9 // indirect
5353
go.uber.org/multierr v1.11.0 // indirect
5454
go.uber.org/zap v1.27.0 // indirect

src/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFd
7272
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
7373
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
7474
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
75+
github.com/netresearch/go-cron v0.13.0 h1:rWDtkLPykLWm9Zny612io1N4HzoVsDJCuDLziND37sQ=
76+
github.com/netresearch/go-cron v0.13.0/go.mod h1:oRPUA7fHC/ul86n+d3SdUD54cEuHIuCLiFJCua5a5/E=
7577
github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns=
7678
github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo=
7779
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
@@ -88,8 +90,6 @@ github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9Z
8890
github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA=
8991
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
9092
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
91-
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
92-
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
9393
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
9494
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
9595
github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY=

src/scheduler/scheduler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"time"
77

88
"github.com/go-logr/logr"
9-
"github.com/robfig/cron/v3"
9+
cron "github.com/netresearch/go-cron"
1010
)
1111

1212
/*

0 commit comments

Comments
 (0)