mirror of
https://github.com/actions/setup-java.git
synced 2024-08-16 10:19:51 +02:00
Create test.yaml
This commit is contained in:
parent
99b8673ff6
commit
9fb49f8385
1 changed files with 37 additions and 0 deletions
37
.github/workflows/test.yaml
vendored
Normal file
37
.github/workflows/test.yaml
vendored
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
name: Display Supported PHP Versions
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
display_versions:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Fetch supported PHP versions
|
||||||
|
id: fetch-versions
|
||||||
|
run: |
|
||||||
|
# Replace `owner/repo` with your actual repository name
|
||||||
|
curl -s "https://raw.githubusercontent.com/owner/repo/main/supported_versions.md" > supported_versions.md
|
||||||
|
|
||||||
|
- name: Display versions as dropdown
|
||||||
|
id: display-dropdown
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
with:
|
||||||
|
commit_message: "Update PHP version dropdown"
|
||||||
|
branch: main
|
||||||
|
files: |
|
||||||
|
versions.json
|
||||||
|
actions: |
|
||||||
|
{
|
||||||
|
"name": "PHP Version",
|
||||||
|
"input_type": "select",
|
||||||
|
"options": [
|
||||||
|
$(awk '{print "{ \"label\": \""$2"\", \"value\": \""$2"\" }"}' supported_versions.md | tr -d '\n')
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in a new issue