mirror of
https://github.com/bahdotsh/wrkflw.git
synced 2026-05-18 05:05:35 +02:00
fix: Support array format for runs-on field in GitHub Actions workflows
- Add custom deserializer for runs-on field to handle both string and array formats - Update Job struct to use Vec<String> instead of String for runs-on field - Modify executor to extract first element from runs-on array for runner selection - Add test workflow to verify both string and array formats work correctly - Maintain backwards compatibility with existing string-based workflows Fixes issue where workflows with runs-on: [self-hosted, ubuntu, small] format would fail with 'invalid type: sequence, expected a string' error. This change aligns with GitHub Actions specification which supports: - String format: runs-on: ubuntu-latest - Array format: runs-on: [self-hosted, ubuntu, small]
This commit is contained in:
18
tests/workflows/runs-on-array-test.yml
Normal file
18
tests/workflows/runs-on-array-test.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
name: Test Runs-On Array Format
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
test-array-runs-on:
|
||||
timeout-minutes: 15
|
||||
runs-on: [self-hosted, ubuntu, small]
|
||||
steps:
|
||||
- name: Test step
|
||||
run: echo "Testing array format for runs-on"
|
||||
|
||||
test-string-runs-on:
|
||||
timeout-minutes: 15
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Test step
|
||||
run: echo "Testing string format for runs-on"
|
||||
Reference in New Issue
Block a user