ci: update github-actions

This commit is contained in:
Rene Leonhardt
2025-07-28 09:10:51 +02:00
parent 4b11563bdf
commit 150e8adf8b
3 changed files with 49 additions and 29 deletions

17
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/optimizing-pr-creation-version-updates#setting-up-a-cooldown-period-for-dependency-updates
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference#groups--
groups:
actions:
# Combine all images of last week
patterns: ["*"]
- package-ecosystem: gomod
directory: /
schedule:
interval: weekly

View File

@@ -9,6 +9,9 @@ on:
permissions: permissions:
contents: read contents: read
env:
GO_VERSION: '1.24'
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -19,10 +22,10 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: '1.24' go-version: ${{ env.GO_VERSION }}
- name: Cache Go modules - name: Cache Go modules
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ~/go/pkg/mod path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
@@ -44,9 +47,9 @@ jobs:
run: go test -v -race -coverprofile=coverage.out ./... run: go test -v -race -coverprofile=coverage.out ./...
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v3 uses: codecov/codecov-action@v5
with: with:
file: ./coverage.out files: ./coverage.out
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -57,10 +60,10 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: '1.24' go-version: ${{ env.GO_VERSION }}
- name: golangci-lint - name: golangci-lint
uses: golangci/golangci-lint-action@v3 uses: golangci/golangci-lint-action@v8
with: with:
version: latest version: latest
@@ -74,7 +77,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: '1.24' go-version: ${{ env.GO_VERSION }}
- name: Build - name: Build
run: go build -v ./... run: go build -v ./...

View File

@@ -18,7 +18,7 @@ INSTALL_DIR="/usr/local/bin"
BINARY_NAME="lnk" BINARY_NAME="lnk"
# Fallback version if redirect fails # Fallback version if redirect fails
FALLBACK_VERSION="v0.0.2" FALLBACK_VERSION="v0.3.0"
# Detect OS and architecture # Detect OS and architecture
detect_platform() { detect_platform() {