Home

Awesome

Github actions for Shovel buckets

Set of automated actions, which will save time when maintaining bucket, managing issues/pull requets. Using main tag instead of specific version is highly recommended.

Available environment variables

  1. GITHUB_TOKEN
    • REQUIRED
    • Use ${{ secrets.GITHUB_TOKEN }}
  2. SCOOP_BRANCH
    • String
    • If specified, shovel config 'SCOOP_BRANCH' $env:SCOOP_BRANCH will be configured and shovel updated
  3. SKIP_UPDATED
    • Anything. Use 1
    • If specified, log of checkver utility will not print latest versions
  4. SPECIAL_SNOWFLAKES
    • String
    • List of manifest names joined with , used as parameter for auto-pr utility.
  5. GITH_EMAIL**
    • String
    • If specified this email will be used as author of commits
  6. GITH_USERNAME
    • Default will be github-actions[bot]
    • If specified this username will be used as author of commits
    • Should be combined with GITH_EMAIL

**: GITH_EMAIL environment variable is not required since 1.0.1, but it is recommended. If email is not specified, commits will not be pushed using account bounded to the email. This will lead to not adding contributions. (See as example commit from github action without user's email)

Available actions

Excavator

Issues

As soon as new issue is created or label verify is added to the issue, action is executed. Based on issue title, specific sub-action is executed. It could be one of these:

Pull Requests

As soon as PR is created or comment /verify posted to it, validation tests are executed (see wiki for detailed desciption):

Overview of validatiors

  1. Required properties (License, Description) are in place
  2. Hashes of files are correct
  3. Checkver functionality
  4. Autoupdate functionality
    1. Hash extraction finished

Example workflows for all actions

#.github\workflows\schedule.yml
on:
  schedule:
  - cron: '*/0 * * * *'
name: Excavator
jobs:
  excavate:
    name: Excavator
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@main
    - name: Excavator
      uses: shovel-org/GithubActions@main
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        SKIP_UPDATED: '1'

#.github\workflows\issues.yml
on:
  issues:
    types: [ opened, labeled ]
name: Issue
jobs:
  issueHandler:
    name: Issue Handler
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@main
    - name: Issue Handler
      uses: shovel-org/GithubActions@main
      if: github.event.action == 'opened' || (github.event.action == 'labeled' && contains(github.event.issue.labels.*.name, 'verify'))
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

#.github\workflows\issue_commented.yml
on:
  issue_comment:
    types: [ created ]
name: Commented Pull Request
jobs:
  pullRequestHandler:
    name: Pull Request Validator
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@main
    - name: Pull Request Validator
      uses: shovel-org/GithubActions@main
      if: startsWith(github.event.comment.body, '/verify')
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

#.github\workflows\pull_request.yml
on:
  pull_request:
    types: [ opened ]
name: Pull Requests
jobs:
  pullRequestHandler:
    name: Pull Request Validator
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@main
    - name: Pull Request Validator
      uses: shovel-org/GithubActions@main
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}