mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-01 19:12:59 +00:00
chore(ci): update (#890)
* Update release-please workflow Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> * test run Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> * update metrics workflow Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> * update other workflows Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> --------- Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
d76084c783
commit
c635044db3
19
.github/workflows/golangci-lint.yml
vendored
19
.github/workflows/golangci-lint.yml
vendored
@ -1,4 +1,5 @@
|
|||||||
name: golangci-lint
|
name: Linter
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
@ -11,16 +12,17 @@ permissions:
|
|||||||
pull-requests: read
|
pull-requests: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
golangci-lint:
|
||||||
golangci:
|
|
||||||
name: lint
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 #v2.2.1
|
- name: Filter paths
|
||||||
|
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 #v2.2.1
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
filters: |
|
filters: |
|
||||||
@ -28,12 +30,13 @@ jobs:
|
|||||||
- '**/*.go'
|
- '**/*.go'
|
||||||
- 'tools/go.mod'
|
- 'tools/go.mod'
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
if: steps.filter.outputs.go == 'true'
|
if: steps.filter.outputs.go == 'true'
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
|
||||||
- name: golangci-lint
|
- name: Lint code
|
||||||
if: steps.filter.outputs.go == 'true'
|
if: steps.filter.outputs.go == 'true'
|
||||||
run: |
|
run: |
|
||||||
go run -modfile=tools/go.mod github.com/golangci/golangci-lint/cmd/golangci-lint run -v --timeout 5m
|
go run -modfile=tools/go.mod github.com/golangci/golangci-lint/cmd/golangci-lint run -v --timeout 5m
|
||||||
|
15
.github/workflows/metrics.yml
vendored
15
.github/workflows/metrics.yml
vendored
@ -1,9 +1,12 @@
|
|||||||
name: metrics
|
name: Publish Metrics
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule: [{cron: "0 0 * * *"}]
|
schedule:
|
||||||
|
- cron: "0 0 * * *" # every day at 00:00 UTC (8pm EST)
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push: {branches: ["main"]}
|
push:
|
||||||
|
branches:
|
||||||
|
- "main"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
github-metrics:
|
github-metrics:
|
||||||
@ -11,13 +14,15 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: lowlighter/metrics@latest
|
|
||||||
|
- name: Generate Metrics
|
||||||
|
uses: lowlighter/metrics@latest
|
||||||
with:
|
with:
|
||||||
template: repository
|
template: repository
|
||||||
filename: metrics.svg
|
filename: metrics.svg
|
||||||
user: bpg
|
user: bpg
|
||||||
repo: terraform-provider-proxmox
|
repo: terraform-provider-proxmox
|
||||||
token: ${{ secrets.METRICS_TOKEN }}
|
token: "${{ secrets.METRICS_TOKEN }}"
|
||||||
output_action: gist
|
output_action: gist
|
||||||
committer_gist: 2cc44ead81225542ed1ef0303d8f9eb9
|
committer_gist: 2cc44ead81225542ed1ef0303d8f9eb9
|
||||||
plugin_lines: yes
|
plugin_lines: yes
|
||||||
|
23
.github/workflows/publish.yml
vendored
23
.github/workflows/publish.yml
vendored
@ -6,15 +6,27 @@
|
|||||||
# secret. If you would rather own your own GPG handling, please fork this action
|
# secret. If you would rather own your own GPG handling, please fork this action
|
||||||
# or use an alternative one for key handling.
|
# or use an alternative one for key handling.
|
||||||
#
|
#
|
||||||
name: publish
|
name: Publish Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
goreleaser:
|
goreleaser:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
- name: Generate Short Lived OAuth App Token
|
||||||
|
uses: actions/create-github-app-token@f04aa94d10cf56334d1c580e077ce2e3569e805d #v1.6.3
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: "${{ secrets.BOT_APP_ID }}"
|
||||||
|
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
|
||||||
|
owner: "${{ github.repository_owner }}"
|
||||||
|
repositories: "${{ github.event.repository.name }}"
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
@ -31,8 +43,8 @@ jobs:
|
|||||||
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 #v6.1.0
|
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 #v6.1.0
|
||||||
with:
|
with:
|
||||||
git_user_signingkey: true
|
git_user_signingkey: true
|
||||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
gpg_private_key: "${{ secrets.GPG_PRIVATE_KEY }}"
|
||||||
passphrase: ${{ secrets.PASSPHRASE }}
|
passphrase: "${{ secrets.PASSPHRASE }}"
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 #v5.0.0
|
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 #v5.0.0
|
||||||
@ -40,6 +52,5 @@ jobs:
|
|||||||
version: latest
|
version: latest
|
||||||
args: release --rm-dist
|
args: release --rm-dist
|
||||||
env:
|
env:
|
||||||
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
GPG_FINGERPRINT: "${{ steps.import_gpg.outputs.fingerprint }}"
|
||||||
# GitHub sets this automatically
|
GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}"
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
19
.github/workflows/release-please.yml
vendored
19
.github/workflows/release-please.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: release-please
|
name: Release Please
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -9,10 +9,23 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
release-please:
|
release-please:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: google-github-actions/release-please-action@db8f2c60ee802b3748b512940dde88eabd7b7e01 #v3.7.13
|
|
||||||
|
- name: Generate Short Lived OAuth App Token
|
||||||
|
uses: actions/create-github-app-token@f04aa94d10cf56334d1c580e077ce2e3569e805d #v1.6.3
|
||||||
|
id: app-token
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.BOT_TOKEN }}
|
app-id: "${{ secrets.BOT_APP_ID }}"
|
||||||
|
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
|
||||||
|
owner: "${{ github.repository_owner }}"
|
||||||
|
repositories: "${{ github.event.repository.name }}"
|
||||||
|
|
||||||
|
- name: Create / Update Release PR
|
||||||
|
uses: google-github-actions/release-please-action@db8f2c60ee802b3748b512940dde88eabd7b7e01 #v3.7.13
|
||||||
|
with:
|
||||||
|
token: "${{ steps.app-token.outputs.token }}"
|
||||||
release-type: go
|
release-type: go
|
||||||
bump-minor-pre-major: true
|
bump-minor-pre-major: true
|
||||||
extra-files: |
|
extra-files: |
|
||||||
|
15
.github/workflows/semgrep.yml
vendored
15
.github/workflows/semgrep.yml
vendored
@ -1,3 +1,5 @@
|
|||||||
|
name: Semgrep
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request: {}
|
pull_request: {}
|
||||||
push:
|
push:
|
||||||
@ -8,15 +10,18 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
|
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
|
||||||
- cron: 29 16 * * *
|
- cron: 29 16 * * *
|
||||||
name: Semgrep
|
|
||||||
jobs:
|
jobs:
|
||||||
semgrep:
|
semgrep:
|
||||||
name: Scan
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
|
SEMGREP_APP_TOKEN: "${{ secrets.SEMGREP_APP_TOKEN }}"
|
||||||
container:
|
container:
|
||||||
image: returntocorp/semgrep
|
image: returntocorp/semgrep
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- run: semgrep ci
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Semgrep
|
||||||
|
run: semgrep ci
|
||||||
|
19
.github/workflows/stale.yaml
vendored
19
.github/workflows/stale.yaml
vendored
@ -1,7 +1,9 @@
|
|||||||
name: Manage Stale Items
|
name: Manage Stale Items
|
||||||
'on':
|
|
||||||
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: 00 00 * * *
|
- cron: 00 00 * * *
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -9,9 +11,20 @@ jobs:
|
|||||||
issues: write
|
issues: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v9
|
|
||||||
|
- name: Generate Short Lived OAuth App Token
|
||||||
|
uses: actions/create-github-app-token@f04aa94d10cf56334d1c580e077ce2e3569e805d #v1.6.3
|
||||||
|
id: app-token
|
||||||
with:
|
with:
|
||||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
app-id: "${{ secrets.BOT_APP_ID }}"
|
||||||
|
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
|
||||||
|
owner: "${{ github.repository_owner }}"
|
||||||
|
repositories: "${{ github.event.repository.name }}"
|
||||||
|
|
||||||
|
- name: Stale Issues and Pull Requests
|
||||||
|
uses: actions/stale@v9
|
||||||
|
with:
|
||||||
|
repo-token: "${{ steps.app-token.outputs.token }}"
|
||||||
days-before-stale: 180
|
days-before-stale: 180
|
||||||
days-before-close: 30
|
days-before-close: 30
|
||||||
exempt-issue-labels: 'needs-triage, acknowledged, in-progress'
|
exempt-issue-labels: 'needs-triage, acknowledged, in-progress'
|
||||||
|
19
.github/workflows/test.yml
vendored
19
.github/workflows/test.yml
vendored
@ -1,4 +1,5 @@
|
|||||||
name: Tests
|
name: Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request: {}
|
pull_request: {}
|
||||||
push:
|
push:
|
||||||
@ -6,26 +7,25 @@ on:
|
|||||||
- main
|
- main
|
||||||
- "release/**"
|
- "release/**"
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 #v2.2.1
|
- name: Filter paths
|
||||||
|
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 #v2.2.1
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
filters: |
|
filters: |
|
||||||
go:
|
go:
|
||||||
- '**/*.go'
|
- '**/*.go'
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Setup Go
|
||||||
if: steps.filter.outputs.go == 'true'
|
if: steps.filter.outputs.go == 'true'
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
@ -40,23 +40,24 @@ jobs:
|
|||||||
run: go vet . && go build -v .
|
run: go vet . && go build -v .
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Unit Tests
|
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 #v2.2.1
|
- name: Filter paths
|
||||||
|
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 #v2.2.1
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
filters: |
|
filters: |
|
||||||
go:
|
go:
|
||||||
- '**/*.go'
|
- '**/*.go'
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Setup Go
|
||||||
if: steps.filter.outputs.go == 'true'
|
if: steps.filter.outputs.go == 'true'
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
|
Loading…
Reference in New Issue
Block a user