GitHub Actions: add log cleaner, adjust names, fix labelling on approve

This commit is contained in:
Igor Pecovnik
2024-11-03 20:59:59 +01:00
committed by Igor
parent 5dd1cd63ce
commit 52548e408a
7 changed files with 79 additions and 27 deletions

View File

@@ -1,22 +0,0 @@
name: Run Build Train on config changes
run-name: Run build train - Pushed commit "${{ github.event.push.head_commit.message }}"
on:
push:
branches:
- "main"
paths:
- "config/*.config"
jobs:
build-train-dispatch:
name: Send dispatch
if: ${{ github.repository_owner == 'Armbian' }}
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
repository: armbian/os
event-type: "Repository update"

View File

@@ -0,0 +1,27 @@
name: Clean Workflow Logs
on:
schedule:
- cron: "0 0 * * 1" # Runs "At 00:00 on Monday." (see https://crontab.guru)
workflow_dispatch:
inputs:
runs_older_than:
description: "The amount of days old to delete"
default: "21"
required: false
env:
SCHEDULED_RUNS_OLDER_THAN: "21"
SCHEDULED_RUNS_TO_KEEP: "0"
jobs:
clean-logs:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: igorjs/gh-actions-clean-workflow@v6
with:
runs_older_than: ${{ github.event.inputs.runs_older_than || env.SCHEDULED_RUNS_OLDER_THAN }}
runs_to_keep: ${{ github.event.inputs.runs_to_keep || env.SCHEDULED_RUNS_TO_KEEP }}

View File

@@ -0,0 +1,24 @@
name: "Welcome first-time issue contributor"
on:
issues:
types: opened
jobs:
welcome-first-time-contributor:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: plbstl/first-contribution@v3
with:
labels: "Good first issue"
issue-opened-msg: |
### Hey @{fc-author} !
Looks like it's your first time interacting with Armbian here on GitHub.
Welcome and thank you for taking the time to report an issue :heart:.
Don't forget to star :star: the repo.

View File

@@ -1,4 +1,4 @@
name: push
name: "Announce PR merge to Discord"
on:
push:

View File

@@ -1,8 +1,8 @@
on: pull_request_target
on: pull_request_review
name: Label approved pull requests
jobs:
labelWhenApproved:
if: github.event.review.state == 'approved'
if: ${{ github.repository_owner == 'armbian' }}
name: Label when approved
runs-on: ubuntu-latest
steps:

View File

@@ -0,0 +1,23 @@
name: "Welcome first-time PR contributor"
on:
pull_request_target:
types: opened
jobs:
welcome-first-time-contributor:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: plbstl/first-contribution@v3
with:
pr-opened-msg: |
### Hey @{fc-author} !
Looks like it's your first pull reqests to Armbian codebase.
Welcome and thank you for contributing :heart: :heart: :heart:.
Don't forget to star :star: the repo.

View File

@@ -1,5 +1,5 @@
name: Update board list at armbian/os
run-name: Update board list at armbian/os - Pushed commit "${{ github.event.push.head_commit.message }}"
name: Update Board Lists
run-name: Update board list at armbian/os
on:
push: