Skip to content

ci: update workflows #258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Actionlint
permissions: { contents: read }

on:
workflow_dispatch: {}
pull_request: {}

permissions:
contents: read
pull_request:
paths:
- ".github/workflows/*.yaml"
- mise.toml

jobs:
actionlint:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ on:
workflow_dispatch: {}
push: { branches: ["main"] }
pull_request: { branches: ["main"] }
schedule:
- cron: '0 0 * * *'
schedule: [{cron: '0 0 * * *'}]

permissions:
security-events: write
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Commitlint
permissions: { contents: read }

on:
pull_request_target: {}

permissions:
contents: read

jobs:
commitlint:
runs-on: ubuntu-latest
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: GolangCI Lint
permissions: { contents: read }

on:
workflow_dispatch: {}
pull_request: {}
pull_request:
paths:
- .github/workflows/golangci-lint.yaml
- .golangci.yaml
- "**.go"
- mise.toml

jobs:
golangci-lint:
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Goreleaser
permissions: { contents: read }

on:
push: { tags: ["*"] }
workflow_dispatch:
inputs:
dry-run:
description: Dry Run
required: false
default: false
type: boolean

push:
tags: ["*"]

pull_request:
paths:
- .github/workflows/goreleaser.yaml
- .goreleaser.yaml
- mise.toml

jobs:
goreleaser:
Expand All @@ -34,9 +33,7 @@ jobs:
- name: Run goreleaser (dry-run)
if: github.event_name == 'pull_request'
run: goreleaser --snapshot
env:
TAP_GITHUB_TOKEN: "${{ secrets.GHCR_RW_TOKEN }}"

env: { TAP_GITHUB_TOKEN: "${{ secrets.GHCR_RW_TOKEN }}" }

- name: Generate Token
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/label-sync.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Label Sync
permissions: { contents: read }

on:
# Manual Trigger
schedule: [{ cron: "0 * * * *" }]
workflow_dispatch:
inputs:
dry-run:
Expand All @@ -12,23 +13,17 @@ on:
required: false
type: boolean

# Dry Run on any PR that changes the labels config or the workflow
pull_request:
paths:
- .github/workflows/label-sync.yaml
- .github/labels.yaml

# "Wet" Run on any push to the main branch that changes the labels config or the workflow
push:
branches: ["main", "master"]
paths:
- .github/workflows/label-sync.yaml
- .github/labels.yaml

# "Wet" Run hourly
schedule:
- cron: "0 * * * *"

jobs:
label-sync:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Labeler
permissions: { contents: read }

on:
pull_request_target: {}
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Release
permissions: { contents: read }

on:
# Manually trigger a new release from the Actions tab
schedule: [{ cron: "0 0 * * *" }]
pull_request: { branches: ["main", "master"] }
workflow_dispatch:
inputs:
version-increment:
Expand All @@ -22,13 +25,9 @@ on:
required: false
type: boolean

# Dry run on any PR to the main branch to make sure the workflow would run
# successfully before merging
pull_request:
branches: ["main"]

schedule:
- cron: "0 0 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

jobs:
release:
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/renovate.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Renovate
permissions: { contents: read }

on:
schedule: [{ cron: "0 * * * *" }]
workflow_dispatch:
inputs:
dry-run:
Expand All @@ -14,21 +16,13 @@ on:
description: Log Level
type: choice
default: debug
options:
- debug
- info
options: [ debug, info ]
required: true
version:
description: Renovate Version
default: latest
required: true

schedule:
- cron: "0 * * * *"

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Test
permissions: { contents: read }

on:
workflow_dispatch: {}

pull_request:
paths:
- .github/workflows/test.yaml
Expand All @@ -19,8 +19,7 @@ jobs:

- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version-file: go.mod
with: { go-version-file: go.mod }

- name: Run tests
run: go test -v ./... -race -covermode=atomic
12 changes: 6 additions & 6 deletions .github/workflows/trivy-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
name: Trivy

on:
schedule: [{cron: "1 0 * * *"}]
pull_request: {}
workflow_dispatch:
inputs:
dry-run:
Expand All @@ -11,16 +13,14 @@ on:
default: false
type: boolean

pull_request:
paths: [ ".github/workflows/trivy-scan.yaml" ]

schedule:
- cron: "1 0 * * *"

permissions:
security-events: write
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

jobs:
scan:
runs-on: ubuntu-latest
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/yamllint.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: YAML Lint
permissions: { contents: read }

on:
workflow_dispatch: {}
pull_request: {}

permissions:
contents: read
pull_request:
paths:
- .github/workflows/yamllint.yaml
- mise.toml
- "**.yaml"

jobs:
yamllint:
Expand Down
1 change: 0 additions & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ k9s = "latest"
# Linters
actionlint = "latest"
yamllint = "latest"
"npm:markdownlint-cli" = "latest"
"npm:@commitlint/cli" = "latest"


Expand Down
18 changes: 2 additions & 16 deletions .renovaterc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,15 @@
":disableRateLimiting",
":semanticCommits",
":timezone(Europe/Bucharest)",
"github>mirceanton/renovate-config//auto-merge/all.json5",
"github>mirceanton/renovate-config//labels/all.json5",
"github>mirceanton/renovate-config//semantic-commits/all.json5"
],
"packageRules": [
{
"description": "Auto-merge GitHub Actions",
"matchManagers": ["github-actions"],
"automerge": true,
"automergeType": "branch",
"matchUpdateTypes": ["minor", "patch", "digest", "pinDigest"],
"minimumReleaseAge": "7 days"
},
{
"description": "Auto-merge Mise Packages",
"matchManagers": ["mise"],
"automerge": true,
"automergeType": "branch",
"matchUpdateTypes": ["minor", "patch", "digest"],
"minimumReleaseAge": "7 days"
},
{
"description": "Auto-merge Helm Values",
"matchManagers": ["helm-values"],
"matchPackageNames": ["/ghcr.io/mirceanton/external-dns-provider-mikrotik/"],
"automerge": true,
"automergeType": "branch",
"matchUpdateTypes": ["major", "minor", "patch", "digest"]
Expand Down
Loading