0
0
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:
Pavel Boldyrev 2024-01-20 22:43:08 -05:00 committed by GitHub
parent b926c57a53
commit a030542da0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 77 additions and 40 deletions

View File

@ -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
View 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

View File

@ -14,7 +14,6 @@ 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:
@ -30,4 +29,3 @@ jobs:
plugin_stargazers: yes plugin_stargazers: yes
plugin_stargazers_days: 365 plugin_stargazers_days: 365
plugin_stargazers_charts_type: graph plugin_stargazers_charts_type: graph

View File

@ -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

View File

@ -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

View File

@ -19,7 +19,6 @@ jobs:
container: container:
image: returntocorp/semgrep image: returntocorp/semgrep
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@ -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

View File

@ -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'