mirror of
https://github.com/lukaszraczylo/shared-actions.git
synced 2026-10-14 05:23:05 +00:00
feat(workflows): add runner input, timeouts and release concurrency
The release, release-cgo and autoupdate workflows must run on a runner the caller chooses. Each workflow now takes a runner input. It accepts a label or a JSON object that selects a runner group. The workflow uses inputs.runner first. It then uses the SHARED_ACTIONS_RUNNER variable and falls back to ubuntu-latest. Callers that set nothing keep the old behaviour. Every job now has a timeout. Release and autoupdate runs use a concurrency group that never cancels a running job.
This commit is contained in:
@@ -19,11 +19,22 @@ on:
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
runner:
|
||||
description: "Runner label, or JSON object such as {\"group\":\"ci\",\"labels\":[\"linux\"]} to select a runner group. Falls back to vars.SHARED_ACTIONS_RUNNER, then ubuntu-latest."
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
concurrency:
|
||||
group: autoupdate-${{ github.repository }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
autoupdate:
|
||||
name: Update dependencies and test
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ fromJSON(startsWith(inputs.runner || vars.SHARED_ACTIONS_RUNNER || 'ubuntu-latest', '{') && inputs.runner || vars.SHARED_ACTIONS_RUNNER || 'ubuntu-latest' || toJSON(inputs.runner || vars.SHARED_ACTIONS_RUNNER || 'ubuntu-latest')) }}
|
||||
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
Reference in New Issue
Block a user