A GitHub action to install Knope.
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install Knope
uses: knope-dev/[email protected]
with:
version: 0.10.0
- name: Use Knope
run: knope --help
You will eventually experience breaking changes if you do this.
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install Knope
uses: knope-dev/[email protected]
- name: Use Knope
run: knope --help
If installing the latest version frequently, you may hit GitHub API limits. If that happens, you can pass a GitHub API token (like the built in one) with the github-token
input:
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install Knope
uses: knope-dev/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Knope
run: knope --help
If pinning to a specific version (recommended), you may want to have Renovate open pull requests when a new version of Knope is available. Here is an example renovate.json
which will do exactly that for any GitHub workflows starting with "release" and ending in "yml" (e.g., release-dry-run.yml):
{
"extends": [
"config:base",
":semanticCommitTypeAll(chore)"
],
"regexManagers": [
{
"fileMatch": [
"release.*\\.yml"
],
"matchStrings": [
"version:\\s*(?<currentValue>.*)"
],
"depNameTemplate": "knope",
"datasourceTemplate": "crate",
"versioningTemplate": "semver"
}
],
"packageRules": [
{
"packagePatterns": [
"^knope$"
],
"groupName": "knope",
"rangeStrategy": "pin"
}
]
}
The matchStrings
is pretty broad right now because debugging Renovate regex is difficult, so you probably have to narrow it for complex workflows. If you do, please contribute a better match back here!