Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create test.yaml #624

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -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://github.com/raw/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