Set of GitHub Actions for Scoop ecosystem.
In this repository, you can find a set of GitHub Actions that are used in Scoop ecosystem, especially for Scoop bucket maintainers to maintain buckets in a less manual way.
We recommend using the ScoopInstaller/BucketTemplate
repository to create your own bucket repository if you are a new bucket maintainer.
It is a template repository that contains all the necessary files and configurations,
including GitHub Actions from this repository, to help you get started quickly.
The Excavator action is responsible for automating the update process of Scoop manifests. It checks for new versions of software and updates the corresponding manifests periodically.
# .github/workflows/excavator.yml
name: Excavator
on:
schedule:
- cron: '20 */4 * * *' # Runs every 4 hours
permissions:
contents: write
jobs:
excavate:
name: Excavate
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Excavate
uses: ScoopInstaller/GithubActions@main
env:
SKIP_UPDATED: 1The Issues action triages issues in the bucket repository. It is executed when
a new issue is created or the label verify is added to an existing issue.
# .github/workflows/issues.yml
name: Issue
on:
issues:
types: [opened, labeled]
permissions:
# Auto hash fixing commits
contents: write
issues: write
jobs:
issueHandler:
name: IssueHandler
if: github.event.action == 'opened' || (github.event.action == 'labeled' && contains(github.event.issue.labels.*.name, 'verify'))
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: IssueHandler
uses: ScoopInstaller/GithubActions@mainBased on the issue title, a specific sub-action is executed. It could be one of:
- Hash check fails
- Checkhashes binary is executed for manifest in title
- Result is parsed
- Hash mismatch
- Pull requests with name
<manifest>@<version>: Fix hashare 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
duplicateadded
- 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,verifiedare added
- Pull requests with name
- No problem
- Comment on issue is posted about hashes being right and possible causes
- Label
hash-fix-neededis removed - Issue is closed
- Binary error
- Label
manifest-fix-neededis 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 wantedare added
- All URLs could be downloaded without problem
- Possible causes are attached in comment
- If there is problematic URL
- Decompression/Extraction error
- Comment to issue is posted
- If one or more specific extraction tool names (7zip|msi|innounp|dark) are mentioned in the issue description
- Only related extraction help tips will be added in comment
- None of the specific extraction tool names are mentioned in the issue description
- All extraction help tips will be added in comment
- If one or more specific extraction tool names (7zip|msi|innounp|dark) are mentioned in the issue description
- Comment to issue is posted
The Pull Requests action validates pull requests in the bucket repository. It
is executed when a new pull request is created or a comment starting with
/verify is posted to an existing pull request.
# .github/workflows/pull_request.yml
name: Pull Requests
on:
# Triggered when a pull request is opened
# or a `/verify` comment is posted to an existing pull request
pull_request:
types: [opened]
issue_comment:
types: [created]
permissions:
contents: read
pull-requests: write
jobs:
pullRequestHandler:
name: PullRequestHandler
if: github.event_name == 'pull_request' || (github.event.issue.pull_request && startsWith(github.event.comment.body, '/verify'))
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: PullRequestHandler
uses: ScoopInstaller/GithubActions@mainMultiple validators are executed for each pull request:
- JSON standard format check
- Required properties (
License,Description) are in place - Hashes of files are correct
- Checkver functionality
- Autoupdate functionality
The lint-pr-title action checks if the title of a pull request follows the
required format. Check lint-pr-title README for more details.
Following environment variables are available for the main action.
- uses: ScoopInstaller/GithubActions@main
env:
# `GITHUB_TOKEN`: Optional, `${{ github.token }}` if not specified
GITHUB_TOKEN: ${{ github.token }}
# `USER_EMAIL`: Optional
# `41898282+github-actions[bot]@users.noreply.github.com` if not specified
USER_EMAIL: ''
# `SCOOP_REPO`: Optional
# If specified, scoop config 'scoop_repo' will be configured and scoop updated
SCOOP_REPO: ''
# `SCOOP_BRANCH`: Optional
# If specified, scoop config 'scoop_branch' will be configured and scoop updated
SCOOP_BRANCH: ''
# `SKIP_UPDATED`: Optional, `1` to enable
# If enabled, log of checkver utility will not print latest versions
SKIP_UPDATED: ''
# `THROW_ERROR`: Optional, `1` to enable
# If enabled, error from checkver utility will be thrown as exception and cause the run to fail
THROW_ERROR: ''
# `SPECIAL_SNOWFLAKES`: Optional
# List of manifest names joined with `,` used as parameter for auto-pr utility.
SPECIAL_SNOWFLAKES: ''Configuration of composable actions can be found in their respective README files in their subfolders.
The project is released under the MIT License.