Skip to content

Commit 215fda1

Browse files
committed
switch to golang 1.25 and update deps
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent dff8128 commit 215fda1

File tree

17 files changed

+328
-301
lines changed

17 files changed

+328
-301
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 'Setup-Go'
2+
description: 'Setup go with dependencies'
3+
runs:
4+
using: composite
5+
steps:
6+
7+
- uses: actions/setup-go@v6
8+
with:
9+
go-version-file: 'go.mod'
10+
cache-dependency-path: "go.sum"
11+
check-latest: true
12+
13+
- name: GoLang dependencies
14+
shell: bash
15+
run: |
16+
go mod vendor
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: 'Setup-Runner'
2+
description: 'Setup runner'
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Set Swap Space
7+
uses: pierotofy/set-swap-space@fc79b3f67fa8a838184ce84a674ca12238d2c761
8+
with:
9+
swap-size-gb: 12

.github/workflows/build-docker.yaml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,16 @@ jobs:
1111
lint:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v6
1515

16-
- name: Set Swap Space
17-
uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c
18-
with:
19-
swap-size-gb: 12
16+
- name: Setup runner
17+
uses: ./.github/actions/setup-runner
2018

21-
- uses: actions/setup-go@v5
22-
with:
23-
go-version-file: 'go.mod'
24-
cache-dependency-path: "go.sum"
25-
check-latest: true
19+
- name: Setup go
20+
uses: ./.github/actions/setup-go
2621

2722
- name: Run Golangci lint
28-
uses: golangci/golangci-lint-action@v7
23+
uses: golangci/golangci-lint-action@v9
2924
with:
3025
version: latest
3126
args: --print-resources-usage
@@ -44,18 +39,13 @@ jobs:
4439

4540
runs-on: ubuntu-latest
4641
steps:
47-
- uses: actions/checkout@v4
42+
- uses: actions/checkout@v6
4843

49-
- name: Set Swap Space
50-
uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c
51-
with:
52-
swap-size-gb: 12
44+
- name: Setup runner
45+
uses: ./.github/actions/setup-runner
5346

54-
- uses: actions/setup-go@v5
55-
with:
56-
go-version-file: 'go.mod'
57-
cache-dependency-path: "go.sum"
58-
check-latest: true
47+
- name: Setup go
48+
uses: ./.github/actions/setup-go
5949

6050
- name: Docker meta
6151
id: docker_meta
@@ -101,3 +91,5 @@ jobs:
10191
push: ${{ inputs.publish }}
10292
tags: ${{ steps.docker_meta.outputs.tags }}
10393
labels: ${{ steps.docker_meta.outputs.labels }}
94+
cache-from: type=gha
95+
cache-to: type=gha,mode=max

.github/workflows/ci-docker.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: "ci/docker"
22

33
on: [pull_request, workflow_dispatch]
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
59
jobs:
610
build:
711
uses: ./.github/workflows/build-docker.yaml

.github/workflows/release-assets.yaml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,34 @@ on:
44
release:
55
types: [created]
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: false
10+
11+
env:
12+
RELEASE_TAG: ${{ github.ref_name }}
13+
714
jobs:
8-
release:
15+
build:
16+
name: "${{ matrix.task }}"
917
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- task: release-assets
1023
steps:
11-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v6
1225

13-
- name: Set Swap Space
14-
uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c
15-
with:
16-
swap-size-gb: 12
26+
- name: Setup runner
27+
uses: ./.github/actions/setup-runner
1728

18-
- uses: actions/setup-go@v5
19-
with:
20-
go-version-file: 'go.mod'
21-
cache-dependency-path: "go.sum"
22-
check-latest: true
29+
- name: Setup go
30+
uses: ./.github/actions/setup-go
2331

2432
- name: Build
2533
run: |
26-
make release-assets
34+
make "${{ matrix.task }}"
2735
2836
- name: Upload assets to release
2937
uses: svenstaro/upload-release-action@v2
@@ -33,3 +41,4 @@ jobs:
3341
tag: ${{ github.ref }}
3442
overwrite: true
3543
file_glob: true
44+
promote: false

.github/workflows/release-docker.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: "release/docker"
22

33
on:
4+
workflow_dispatch: {}
45
push:
56
branches:
67
- 'main'
@@ -9,6 +10,10 @@ on:
910
tags:
1011
- '*.*.*'
1112

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
1217
jobs:
1318
release:
1419
uses: ./.github/workflows/build-docker.yaml

.github/workflows/schedule-docker.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
schedule:
55
- cron: '45 6 * * 1'
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
schedule:
913
uses: ./.github/workflows/build-docker.yaml

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#############################################
22
# Build
33
#############################################
4-
FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS build
4+
FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS build
55

66
RUN apk upgrade --no-cache --force
77
RUN apk add --update build-base make git

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
PROJECT_NAME := $(shell basename $(CURDIR))
22
GIT_TAG := $(shell git describe --dirty --tags --always)
33
GIT_COMMIT := $(shell git rev-parse --short HEAD)
4-
LDFLAGS := -X "main.gitTag=$(GIT_TAG)" -X "main.gitCommit=$(GIT_COMMIT)" -extldflags "-static" -s -w
4+
BUILD_DATE := $(shell TZ=UTC date '+%Y-%m-%dT%H:%M:%SZ')
5+
LDFLAGS := -X "main.gitTag=$(GIT_TAG)" -X "main.gitCommit=$(GIT_COMMIT)" -X "main.buildDate=$(BUILD_DATE)" -extldflags "-static" -s -w
56

67
FIRST_GOPATH := $(firstword $(subst :, ,$(shell go env GOPATH)))
78
GOLANGCI_LINT_BIN := $(FIRST_GOPATH)/bin/golangci-lint

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@ Usage:
1414
github-workflow-exporter [OPTIONS]
1515
1616
Application Options:
17-
--log.debug debug mode [$LOG_DEBUG]
18-
--log.devel development mode [$LOG_DEVEL]
19-
--log.json Switch log output to json format [$LOG_JSON]
20-
--github.enterprise.url= GitHub enterprise url (self hosted) [$GITHUB_ENTERPRISE_URL]
21-
--github.organization= GitHub organization name [$GITHUB_ORGANIZATION]
22-
--github.token= GitHub token auth: PAT [$GITHUB_TOKEN]
23-
--github.app.id= GitHub app auth: App ID [$GITHUB_APP_ID]
24-
--github.app.installationid= GitHub app auth: App installation ID [$GITHUB_APP_INSTALLATION_ID]
25-
--github.app.keyfile= GitHub app auth: Private key (path to file) [$GITHUB_APP_PRIVATE_KEY]
26-
--github.repository.customprops= GitHub repository custom properties as labels for repos and workflows (space delimiter)
27-
[$GITHUB_REPOSITORY_CUSTOMPROPS]
28-
--github.workflows.timeframe= GitHub workflow timeframe for fetching (default: 168h) [$GITHUB_WORKFLOWS_TIMEFRAME]
29-
--scrape.time= Scrape time (default: 30m) [$SCRAPE_TIME]
30-
--cache.path= Cache path (to folder, file://path... or azblob://storageaccount.blob.core.windows.net/containername or
31-
k8scm://{namespace}/{configmap}}) [$CACHE_PATH]
32-
--server.bind= Server address (default: :8080) [$SERVER_BIND]
33-
--server.timeout.read= Server read timeout (default: 5s) [$SERVER_TIMEOUT_READ]
34-
--server.timeout.write= Server write timeout (default: 10s) [$SERVER_TIMEOUT_WRITE]
17+
--log.level=[trace|debug|info|warning|error] Log level (default: info) [$LOG_LEVEL]
18+
--log.format=[logfmt|json] Log format (default: logfmt) [$LOG_FORMAT]
19+
--log.source=[|short|file|full] Show source for every log message (useful for debugging and bug reports) [$LOG_SOURCE]
20+
--log.color=[|auto|yes|no] Enable color for logs [$LOG_COLOR]
21+
--log.time Show log time [$LOG_TIME]
22+
--github.enterprise.url= GitHub enterprise url (self hosted) [$GITHUB_ENTERPRISE_URL]
23+
--github.organization= GitHub organization name [$GITHUB_ORGANIZATION]
24+
--github.token= GitHub token auth: PAT [$GITHUB_TOKEN]
25+
--github.app.id= GitHub app auth: App ID [$GITHUB_APP_ID]
26+
--github.app.installationid= GitHub app auth: App installation ID [$GITHUB_APP_INSTALLATION_ID]
27+
--github.app.keyfile= GitHub app auth: Private key (path to file) [$GITHUB_APP_PRIVATE_KEY]
28+
--github.repository.customprops= GitHub repository custom properties as labels for repos and workflows (space delimiter) [$GITHUB_REPOSITORY_CUSTOMPROPS]
29+
--github.workflows.timeframe= GitHub workflow timeframe for fetching (default: 168h) [$GITHUB_WORKFLOWS_TIMEFRAME]
30+
--scrape.time= Scrape time (default: 30m) [$SCRAPE_TIME]
31+
--cache.path= Cache path (to folder, file://path... or azblob://storageaccount.blob.core.windows.net/containername or k8scm://{namespace}/{configmap}}) [$CACHE_PATH]
32+
--server.bind= Server address (default: :8080) [$SERVER_BIND]
33+
--server.timeout.read= Server read timeout (default: 5s) [$SERVER_TIMEOUT_READ]
34+
--server.timeout.write= Server write timeout (default: 10s) [$SERVER_TIMEOUT_WRITE]
3535
3636
Help Options:
37-
-h, --help Show this help message
37+
-h, --help Show this help message
3838
```
3939

4040
### Authentication

0 commit comments

Comments
 (0)