Skip to content

Commit

Permalink
GitHub Actions: add log cleaner, adjust names, fix labelling on approve
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik committed Nov 3, 2024
1 parent 5dd1cd6 commit 52548e4
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 27 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/build-train.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/clean-workflow-logs.yml
Original file line number Diff line number Diff line change
@@ -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 }}
24 changes: 24 additions & 0 deletions .github/workflows/issue-welcome-first-time.yml
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion .github/workflows/merge-announce.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: push
name: "Announce PR merge to Discord"

on:
push:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-label-on-approved.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/pr-welcome-first-time.yml
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 52548e4

Please sign in to comment.