mirror of
https://github.com/agresdominik/ci-pipelines.git
synced 2026-07-21 23:30:55 +00:00
Compare commits
3 Commits
8443802372
...
v0.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 3e245fb094 | |||
| 5e027a1d0d | |||
| 1325e3040a |
@@ -0,0 +1,8 @@
|
||||
[tool.commitizen]
|
||||
name = cz_conventional_commits
|
||||
version = 0.0.1
|
||||
tag_format = v
|
||||
update_changelog_on_bump = true
|
||||
version_files = [
|
||||
.cz.toml:version
|
||||
]
|
||||
@@ -0,0 +1,61 @@
|
||||
name: Go Releaser Check
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
go-version-file:
|
||||
description: "Path to go.mod for version resolution"
|
||||
type: string
|
||||
default: "go.mod"
|
||||
snapshot-artifact:
|
||||
description: "Upload snapshot binaries as artifact"
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: goreleaser check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: ${{ inputs.go-version-file }}
|
||||
cache: true
|
||||
|
||||
- name: Validate .goreleaser.yaml
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
version: latest
|
||||
args: check
|
||||
|
||||
build:
|
||||
name: goreleaser build (snapshot)
|
||||
runs-on: ubuntu-latest
|
||||
needs: check
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: ${{ inputs.go-version-file }}
|
||||
cache: true
|
||||
|
||||
- name: Build snapshot
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
version: latest
|
||||
args: build --snapshot --clean
|
||||
|
||||
- name: Upload snapshot binaries
|
||||
if: ${{ inputs.snapshot-artifact }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: snapshot-binaries
|
||||
path: dist/
|
||||
retention-days: 3
|
||||
@@ -0,0 +1,35 @@
|
||||
name: Go Release
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
go-version-file:
|
||||
description: "Path to go.mod for version resolution"
|
||||
type: string
|
||||
default: "go.mod"
|
||||
secrets:
|
||||
GITHUB_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: goreleaser release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: ${{ inputs.go-version-file }}
|
||||
cache: true
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
version: latest
|
||||
args: release --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,69 @@
|
||||
# Reusable YAML lint workflow
|
||||
# Lives in your central workflows repo, e.g.:
|
||||
# github.com/your-org/.github/.github/workflows/yaml-lint.yml
|
||||
#
|
||||
# Call it from any repo:
|
||||
# uses: your-org/.github/.github/workflows/yaml-lint.yml@main
|
||||
|
||||
name: YAML Lint
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
paths:
|
||||
description: >
|
||||
Space-separated list of files/directories to lint.
|
||||
Supports glob patterns (passed directly to yamllint).
|
||||
type: string
|
||||
default: "."
|
||||
config-file:
|
||||
description: >
|
||||
Path to a .yamllint.yml config in the calling repo.
|
||||
Ignored if config-data is set.
|
||||
type: string
|
||||
default: ".yamllint.yml"
|
||||
config-data:
|
||||
description: >
|
||||
Inline yamllint config string. Takes precedence over config-file.
|
||||
Example: "{extends: default, rules: {line-length: {max: 120}}}"
|
||||
type: string
|
||||
default: ""
|
||||
strict:
|
||||
description: "Treat warnings as errors (exit 1 on any warning)."
|
||||
type: boolean
|
||||
default: false
|
||||
actionlint:
|
||||
description: "Also run actionlint on .github/workflows/."
|
||||
type: boolean
|
||||
default: true
|
||||
runner:
|
||||
description: "Runner label."
|
||||
type: string
|
||||
default: "ubuntu-latest"
|
||||
|
||||
jobs:
|
||||
yamllint:
|
||||
name: yamllint
|
||||
runs-on: ${{ inputs.runner }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: yamllint
|
||||
uses: ibiqlik/action-yamllint@v3
|
||||
with:
|
||||
file_or_dir: ${{ inputs.paths }}
|
||||
config_file: ${{ inputs.config-file }}
|
||||
config_data: ${{ inputs.config-data }}
|
||||
strict: ${{ inputs.strict }}
|
||||
|
||||
actionlint:
|
||||
name: actionlint
|
||||
runs-on: ${{ inputs.runner }}
|
||||
if: ${{ inputs.actionlint }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: actionlint
|
||||
uses: rhysd/actionlint@v1
|
||||
with:
|
||||
ignore: ""
|
||||
Reference in New Issue
Block a user