mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-08-23 11:58:34 +00:00
chore(ci): add link checker, reformat actions code (#944)
* chore(ci): add link checker, reformat actions code Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> * chore: use bot app token 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
b926c57a53
commit
a030542da0
3
.github/workflows/golangci-lint.yml
vendored
3
.github/workflows/golangci-lint.yml
vendored
@ -15,7 +15,6 @@ jobs:
|
|||||||
golangci-lint:
|
golangci-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@ -34,7 +33,7 @@ jobs:
|
|||||||
uses: actions/setup-go@v5
|
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: Lint code
|
- name: Lint code
|
||||||
if: steps.filter.outputs.go == 'true'
|
if: steps.filter.outputs.go == 'true'
|
||||||
|
46
.github/workflows/link-check.yml
vendored
Normal file
46
.github/workflows/link-check.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
name: "Link Check"
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * 0"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
link-check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Generate Short Lived OAuth App Token
|
||||||
|
uses: actions/create-github-app-token@c4fa18d55c5d49e6a2793e351ea4938322c61072 # v1.6.4
|
||||||
|
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
|
||||||
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
|
- name: Link Checker
|
||||||
|
uses: lycheeverse/lychee-action@c3089c702fbb949e3f7a8122be0c33c017904f9b # v1.9.1
|
||||||
|
id: lychee
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}"
|
||||||
|
|
||||||
|
- name: Find Link Checker Issue
|
||||||
|
id: link-checker-issue
|
||||||
|
uses: micalevisk/last-issue-action@0d40124cc99ac8601c2516007f0c98ef3d27537b # v2.3.0
|
||||||
|
with:
|
||||||
|
state: open
|
||||||
|
labels: |
|
||||||
|
broken-links
|
||||||
|
|
||||||
|
- name: Update Issue
|
||||||
|
uses: peter-evans/create-issue-from-file@433e51abf769039ee20ba1293a088ca19d573b7f # renovate: tag=v4.0.1
|
||||||
|
with:
|
||||||
|
title: Broken links detected 🔗
|
||||||
|
issue-number: "${{ steps.link-checker-issue.outputs.issue-number }}"
|
||||||
|
content-filepath: ./lychee/out.md
|
||||||
|
token: "${{ steps.app-token.outputs.token }}"
|
||||||
|
labels: |
|
||||||
|
broken-links
|
26
.github/workflows/metrics.yml
vendored
26
.github/workflows/metrics.yml
vendored
@ -14,20 +14,18 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Generate Metrics
|
- name: Generate Metrics
|
||||||
uses: lowlighter/metrics@latest
|
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
|
||||||
plugin_followup: yes
|
plugin_followup: yes
|
||||||
plugin_stargazers: yes
|
plugin_stargazers: yes
|
||||||
plugin_stargazers_days: 365
|
plugin_stargazers_days: 365
|
||||||
plugin_stargazers_charts_type: graph
|
plugin_stargazers_charts_type: graph
|
||||||
|
|
||||||
|
5
.github/workflows/publish.yml
vendored
5
.github/workflows/publish.yml
vendored
@ -11,13 +11,12 @@ 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
|
- name: Generate Short Lived OAuth App Token
|
||||||
uses: actions/create-github-app-token@c4fa18d55c5d49e6a2793e351ea4938322c61072 # v1.6.4
|
uses: actions/create-github-app-token@c4fa18d55c5d49e6a2793e351ea4938322c61072 # v1.6.4
|
||||||
id: app-token
|
id: app-token
|
||||||
@ -36,7 +35,7 @@ jobs:
|
|||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: "go.mod"
|
||||||
|
|
||||||
- name: Import GPG key
|
- name: Import GPG key
|
||||||
id: import_gpg
|
id: import_gpg
|
||||||
|
1
.github/workflows/release-please.yml
vendored
1
.github/workflows/release-please.yml
vendored
@ -12,7 +12,6 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Generate Short Lived OAuth App Token
|
- name: Generate Short Lived OAuth App Token
|
||||||
uses: actions/create-github-app-token@c4fa18d55c5d49e6a2793e351ea4938322c61072 # v1.6.4
|
uses: actions/create-github-app-token@c4fa18d55c5d49e6a2793e351ea4938322c61072 # v1.6.4
|
||||||
id: app-token
|
id: app-token
|
||||||
|
17
.github/workflows/semgrep.yml
vendored
17
.github/workflows/semgrep.yml
vendored
@ -4,12 +4,12 @@ on:
|
|||||||
pull_request: {}
|
pull_request: {}
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- .github/workflows/semgrep.yml
|
- .github/workflows/semgrep.yml
|
||||||
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 * * *
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
semgrep:
|
semgrep:
|
||||||
@ -19,9 +19,8 @@ jobs:
|
|||||||
container:
|
container:
|
||||||
image: returntocorp/semgrep
|
image: returntocorp/semgrep
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Checkout
|
- name: Semgrep
|
||||||
uses: actions/checkout@v4
|
run: semgrep ci
|
||||||
|
|
||||||
- name: Semgrep
|
|
||||||
run: semgrep ci
|
|
||||||
|
5
.github/workflows/stale.yaml
vendored
5
.github/workflows/stale.yaml
vendored
@ -11,7 +11,6 @@ jobs:
|
|||||||
issues: write
|
issues: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Generate Short Lived OAuth App Token
|
- name: Generate Short Lived OAuth App Token
|
||||||
uses: actions/create-github-app-token@c4fa18d55c5d49e6a2793e351ea4938322c61072 # v1.6.4
|
uses: actions/create-github-app-token@c4fa18d55c5d49e6a2793e351ea4938322c61072 # v1.6.4
|
||||||
id: app-token
|
id: app-token
|
||||||
@ -27,8 +26,8 @@ jobs:
|
|||||||
repo-token: "${{ steps.app-token.outputs.token }}"
|
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"
|
||||||
exempt-pr-labels: 'needs-review, under-review, acknowledged, planned'
|
exempt-pr-labels: "needs-review, under-review, acknowledged, planned"
|
||||||
remove-stale-when-updated: true
|
remove-stale-when-updated: true
|
||||||
delete-branch: false
|
delete-branch: false
|
||||||
stale-issue-label: stale
|
stale-issue-label: stale
|
||||||
|
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@ -11,7 +11,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@ -29,7 +28,7 @@ jobs:
|
|||||||
if: steps.filter.outputs.go == 'true'
|
if: steps.filter.outputs.go == 'true'
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: "go.mod"
|
||||||
|
|
||||||
- name: Get dependencies
|
- name: Get dependencies
|
||||||
if: steps.filter.outputs.go == 'true'
|
if: steps.filter.outputs.go == 'true'
|
||||||
@ -43,7 +42,6 @@ jobs:
|
|||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@ -61,7 +59,7 @@ jobs:
|
|||||||
if: steps.filter.outputs.go == 'true'
|
if: steps.filter.outputs.go == 'true'
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: "go.mod"
|
||||||
|
|
||||||
- name: Get dependencies
|
- name: Get dependencies
|
||||||
if: steps.filter.outputs.go == 'true'
|
if: steps.filter.outputs.go == 'true'
|
||||||
|
Loading…
Reference in New Issue
Block a user