JavaScript Github Action to clean up offline self-hosted runners linked to a repository.
- You have a repository where you use self-hosted runners.
- You have a github app linked to that repository.
- You have added secrets to your repository that are later used to set environment variables. More information on secrets: How to set up secrets.
Everything below is required. There are no default values provided.
repo-name: The name of the repository for which you want to clean up offline runnersrepo-owner: The owner of the repository for which you want to clean up offline runners
APP_ID: GitHub App IDAPP_PRIVATE_KEY: GitHub App Private Key
name: clean-up-runners
on: <event on which the action has to start>
jobs:
manage-runners:
runs-on: ubuntu-latest
steps:
- uses: LorenzoDrudi/clean-up-offline-github-runners@<version to use>
env:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
with:
repo-name: <name of the repository for which you want to clean up offline runners>
repo-owner: <owner of the repository for which you want to clean up offline runners>All the personal inputs are passed by github secret. See the docs.
A github action workflow automatically creates a Tag and a Release every push on the main branch.
That's only a good DevOps practice, furthermore the main branch is protected and changes can come only over PR.
The idea is to work on develop/features branches and when it's done merge to the main branch, so the workflow starts.
The default behaviour is to create a minor tag/release (e.g. 1.*.0), the schema is <major_version>.<minor_version>.<patch_version>.
It's possible also to create major or patch tags/releases adding a tag at the end of the commit message:
#major-> e.g. *.0.0#patch-> e.g. 1.1.*
For more info see the references.
- Generated from: JavaScript-Action
- To learn how to create a simple action, start here: Hello-World-JavaScript-Action
- Recommended documentation: Creating a JavaScript Action
- Github action used to create a new tag: github-tag-action
- Github Action used for the release: action-gh-release