move things to archive and some cleanup
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
name: Clustertool-go-lint
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
on:
|
||||
# push:
|
||||
# branches:
|
||||
# - main
|
||||
# tags:
|
||||
# - "*"
|
||||
# paths:
|
||||
# - 'main.go'
|
||||
# - 'go.mod'
|
||||
# - 'go.sum'
|
||||
# - 'pkg/**'
|
||||
# - 'cmd/**'
|
||||
# - 'clustertool/**'
|
||||
# - ".github/workflows/clsutertool.test.yaml"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'main.go'
|
||||
- 'go.mod'
|
||||
- 'go.sum'
|
||||
- 'pkg/**'
|
||||
- 'cmd/**'
|
||||
- 'clustertool/**'
|
||||
- ".github/workflows/clsutertool.test.yaml"
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
runs-on:
|
||||
group: default
|
||||
steps:
|
||||
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
|
||||
with:
|
||||
go-version: stable
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8
|
||||
with:
|
||||
version: latest
|
||||
args: --timeout 3m0s
|
||||
@@ -1,34 +0,0 @@
|
||||
name: clustertool-go-release
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
paths:
|
||||
- 'clustertool/**'
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on:
|
||||
group: default
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
|
||||
with:
|
||||
go-version: stable
|
||||
cache: true
|
||||
cache-dependency-path: |
|
||||
**/go.mod
|
||||
**/go.sum
|
||||
# - name: Install Syft
|
||||
# run: sudo curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
|
||||
|
||||
- uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6
|
||||
with:
|
||||
args: release --clean
|
||||
distribution: goreleaser # or 'goreleaser-pro'
|
||||
version: "~> v2" # or 'latest', 'nightly', semver
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ secrets.BOT_TOKEN }}"
|
||||
@@ -1,64 +0,0 @@
|
||||
name: clustertool-go-tests
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- "*"
|
||||
paths:
|
||||
- 'main.go'
|
||||
- 'go.mod'
|
||||
- 'go.sum'
|
||||
- 'pkg/**'
|
||||
- 'cmd/**'
|
||||
- 'clustertool/**'
|
||||
- ".github/workflows/clustertool.test.yaml"
|
||||
#pull_request:
|
||||
# branches:
|
||||
# - main
|
||||
# paths:
|
||||
# - 'main.go'
|
||||
# - 'go.mod'
|
||||
# - 'go.sum'
|
||||
# - 'pkg/**'
|
||||
# - 'cmd/**'
|
||||
# - 'clustertool/**'
|
||||
# - ".github/workflows/clsutertool.test.yaml"
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
|
||||
check_changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
changes_detected: ${{ steps.filter.outputs.changed }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
||||
|
||||
- name: Filter paths
|
||||
id: filter
|
||||
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
|
||||
with:
|
||||
list-files: json
|
||||
filters: |
|
||||
changed:
|
||||
- 'clustertool/**'
|
||||
|
||||
build:
|
||||
runs-on:
|
||||
group: default
|
||||
if: needs.check_changes.outputs.changes_detected == 'true'
|
||||
steps:
|
||||
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
|
||||
with:
|
||||
go-version: stable
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
||||
- run: |
|
||||
cd ./clustertool
|
||||
go build -o /usr/local/bin/clustertool
|
||||
go test -v ./... -race -covermode=atomic
|
||||
clustertool-dev
|
||||
Reference in New Issue
Block a user