-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
60 lines (58 loc) · 2.08 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: 'JSON to Variables Setter'
description: 'Parse JSON file and set GitHub Actions outputs'
author: '7rikazhexde'
branding:
icon: 'file'
color: 'green'
inputs:
json-file:
description: 'Path to the JSON file'
required: true
default: '.github/workflows/matrix.json'
outputs:
os:
description: 'List of operating systems'
value: ${{ steps.set_outputs.outputs.os }}
versions_python:
description: 'List of Python versions'
value: ${{ steps.set_outputs.outputs.versions_python }}
versions_ruby:
description: 'List of Ruby versions'
value: ${{ steps.set_outputs.outputs.versions_ruby }}
versions_nodejs:
description: 'List of Node.js versions'
value: ${{ steps.set_outputs.outputs.versions_nodejs }}
versions_go:
description: 'List of Golang versions'
value: ${{ steps.set_outputs.outputs.versions_go }}
versions_rust:
description: 'List of Rust versions'
value: ${{ steps.set_outputs.outputs.versions_rust }}
ghpages_branch:
description: 'GitHub Pages branch'
value: ${{ steps.set_outputs.outputs.ghpages_branch }}
runs:
using: "composite"
steps:
- name: Set up Python
uses: actions/setup-python@v5.3.0
with:
python-version: '3.13'
- name: Parse JSON and set outputs
id: set_outputs
shell: bash
run: |
python ${{ github.action_path }}/json2vars_setter/json_to_github_output.py ${{ inputs.json-file }}
env:
GITHUB_OUTPUT: $GITHUB_OUTPUT
- name: Debug Output Values
shell: bash
run: |
echo "Debug: Checking output values"
echo "OS: ${{ steps.set_outputs.outputs.os }}"
echo "Python Versions: ${{ steps.set_outputs.outputs.versions_python }}"
echo "Ruby Versions: ${{ steps.set_outputs.outputs.versions_ruby }}"
echo "Node.js Versions: ${{ steps.set_outputs.outputs.versions_nodejs }}"
echo "Go Versions: ${{ steps.set_outputs.outputs.versions_go }}"
echo "Rust Versions: ${{ steps.set_outputs.outputs.versions_rust }}"
echo "GitHub Pages Branch: ${{ steps.set_outputs.outputs.ghpages_branch }}"