Renamed debug file. #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fetch, Modify, and Output info.json | |
on: | |
push: | |
branches: | |
- bug-fix-github-workflow-faustwp-issues | |
jobs: | |
fetch_modify_info_json: | |
name: Fetch, Modify, and Output info.json | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Fetch info.json | |
run: | | |
curl -sSL "https://wpe-plugin-updates.wpengine.com/faustwp/info.json" -o info.json | |
- name: Modify info.json using jq | |
run: | | |
current_time=$(date -u +"%Y-%m-%d %-I:%M%p GMT") | |
version="1.8.1" # Replace this with your version dynamically if needed | |
download_link="https://wpe-plugin-updates.wpengine.com/faustwp/faustwp.${version}.zip" | |
# Use jq to modify the info.json file | |
jq \ | |
--arg version "$version" \ | |
--arg last_updated "$current_time" \ | |
--arg download_link "$download_link" \ | |
--arg new_version "$version" \ | |
--arg new_download_link "$download_link" \ | |
'.versions = {($new_version): $new_download_link} + .versions | .version=$version | .last_updated=$last_updated | .download_link=$download_link' \ | |
info.json > info.json.tmp && mv info.json.tmp info.json | |
- name: Output modified info.json | |
run: | | |
echo "Modified info.json content:" | |
cat info.json |