Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

ci: update workflows #862

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/workflows/check_pr_title.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/cron_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Cron checks
on:
schedule:
- cron: '30 1 * * *'

jobs:
stale_issues:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
with:
days-before-stale: 30
days-before-pr-stale: -1
days-before-close: 7
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
stale-issue-label: 'stale issue'
exempt-issue-labels: 'good first issue, WIP, question, up for grabs'

dead_readme_links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Check links
uses: lycheeverse/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: --verbose --no-progress --timeout 10 --max-concurrency 2 -- './**/*.md'
output: ./lychee/out.md

- name: Get current date
id: date
run: echo "::set-output name=now::$(date +'%d-%m-%Y')"

- name: Create issue when fail
if: ${{ steps.lychee.outputs.exit_code }} != 0
uses: peter-evans/create-issue-from-file@v3
with:
title: Automated Links Checker Report for ${{ steps.date.outputs.now }}
content-filepath: ./lychee/out.md
labels: documentation
19 changes: 0 additions & 19 deletions .github/workflows/files_existence.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PR checks

on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened

jobs:
check_file_existence:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Check if important files exist
id: check_files
uses: andstor/file-existence-action@v2
with:
files: "pkg/defaultRules/defaultRules.yaml, pkg/defaultPolicies/defaultPolicies.yaml"
fail: true

check_pr_title:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10.8'

- name: Check if PR title matches the required format
run: python ./scripts/check_pr_title.py
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ jobs:
go_build_and_test:
uses: ./.github/workflows/reusable_go_build.yml
with:
goBuildTag: staging
goBuildTag: staging
20 changes: 0 additions & 20 deletions .github/workflows/stale.yml

This file was deleted.