GitHub Action
Bucket Minion
Set of automated actions, which will bucket maintainer ever need to save time managing issues/pull requets. Using stable
tag instead of specific version is highly recommended.
Use SHOVEL
environment variable for more advanced and optimized scoop implementation.
GITHUB_TOKEN
- REQUIRED
- Use
${{ secrets.GITHUB_TOKEN }}
GITH_EMAIL
**- String
- If specified,
SHOVEL
implementation will be used
SHOVEL
- Anything. Use
1
- If specified,
SHOVEL
implementation will be used - It will be required in future versions to support installation/uninstallation PR checks
- Anything. Use
SCOOP_BRANCH
- String
- If specified, scoop config 'SCOOP_BRANCH' will be configured and scoop updated
SKIP_UPDATED
- Anything. Use
1
- If specified, log of checkver utility will not print latest versions
- Anything. Use
SPECIAL_SNOWFLAKES
- String
- List of manifest names joined with
,
used as parameter for auto-pr utility.
**: 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)
- βββ Protected master branches are not supported, due to security concern from GitHub side βββ
- Periodically execute automatic updates for all manifests
- Refer to help page for configuration formats
- https://github.com/ScoopInstaller/Excavator alternative
- No need to have custom device, which could run docker or scheduled task for auto-pr 24/7
As soon as new issue is created or label verify
is added into issue, action is executed.
Based on issue title, specific sub-action is executed.
It could be one of these:
- Hash check fails
- Checkhashes binary is executed for manifest in title
- Result is parsed
- Hash mismatch
- Pull requests with name
<manifest>@<version>: Fix hash
are listed- There is PR already
- The newest one is selected
- Description of this PR is updated with closing directive for created issue
- Comment to issue is posted with reference to PR
- Label
duplicate
added
- If none
- New branch
<manifest>-hash-fix-<random>
is created - Changes are commited
- New PR is created from this branch
- New branch
- There is PR already
- Labels
hash-fix-needed
,verified
are added
- Pull requests with name
- No problem
- Comment on issue is posted about hashes being right and possible causes
- Label
hash-fix-needed
is removed - Issue is closed
- Binary error
- Label
manifest-fix-needed
is added
- Label
- Hash mismatch
- Download failed
- All urls defined in manifest are retrieved
- Downloading of all urls is executed
- Comment to issue is posted
- If there is problematic URL
- List of these URLs is attached in comment
- Labels
manifest-fix-needed
,verified
,help wanted
are added
- All URLs could be downloaded without problem
- Possible causes are attached in comment
- If there is problematic URL
As soon as PR is created or comment /verify
posted to it, validation tests are executed (see wiki for detailed desciption):
- ββ Pull request created from forked repository cannot be verified due to security concern from GitHub side ββ
- Manual
/verify
comment is needed (Ash258/GithubActionsBucketForTesting#176)
- Manual
- Required properties (
License
,Description
) are in place - Hashes of files are correct
- Checkver functionality
- Autoupdate functionality
- Hash extraction finished
- Names could be changed as desired
if
statements are not required- There are only time savers when finding appropriate action log
- Save GitHub resources
#.github\workflows\schedule.yml
on:
schedule:
- cron: '*/30 * * * *'
name: Excavator
jobs:
excavate:
name: Excavator
runs-on: windows-latest
steps:
- uses: actions/checkout@main
- name: Excavator
uses: Ash258/Scoop-GithubActions@stable-win
env:
GITH_EMAIL: youremail@mail.com
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: Ash258/Scoop-GithubActions@stable-win
if: github.event.action == 'opened' || (github.event.action == 'labeled' && contains(github.event.issue.labels.*.name, 'verify'))
env:
GITH_EMAIL: youremail@mail.com # Not needed, but recommended
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: Ash258/Scoop-GithubActions@stable-win
if: startsWith(github.event.comment.body, '/verify')
env:
GITH_EMAIL: youremail@mail.com # Not needed, but recommended
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: Ash258/Scoop-GithubActions@stable-win
env:
GITH_EMAIL: youremail@mail.com # Not needed, but recommended
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}