https://github.com/knope-dev/action
https://github.com/knope-dev/action
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/knope-dev/action
- Owner: knope-dev
- Created: 2022-08-21T17:47:00.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-04T19:40:35.000Z (over 2 years ago)
- Last Synced: 2024-04-05T03:02:30.091Z (about 2 years ago)
- Language: Shell
- Size: 11.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Knope GitHub Action
A GitHub action to install [Knope].
## Examples
### Install Specific Version (recommended)
```yaml
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install Knope
uses: knope-dev/action@v2.1.2
with:
version: 0.22.2
- name: Use Knope
run: knope --help
```
### Install Latest Version
**You will eventually experience breaking changes if you do this.**
```yaml
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install Knope
uses: knope-dev/action@v2.1.2
- 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](https://docs.github.com/en/actions/security-guides/automatic-token-authentication)) with the `github-token` input:
```yaml
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install Knope
uses: knope-dev/action@v2.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Knope
run: knope --help
```
### Updating with Renovate
If pinning to a specific version (recommended), you may want to have [Renovate](https://github.com/marketplace/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):
```json
{
"extends": [
"config:base",
":semanticCommitTypeAll(chore)"
],
"regexManagers": [
{
"fileMatch": [
"release.*\\.yml"
],
"matchStrings": [
"version:\\s*(?.*)"
],
"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!
[Knope]: https://knope.tech