Skip to content

Commit

Permalink
Prototype: Test a new GitHub action for json (#6088)
Browse files Browse the repository at this point in the history
Co-authored-by: engahmeds3ed <[email protected]>
Co-authored-by: Vasilis Manthos <[email protected]>
Co-authored-by: vmanthos <[email protected]>
  • Loading branch information
4 people authored Aug 9, 2023
1 parent cb7dd13 commit b73125b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 42 deletions.
53 changes: 12 additions & 41 deletions .github/workflows/deploy_dynamic_lists_fallback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,62 +31,33 @@ jobs:
with:
token: ${{ secrets.GH_WORKFLOW_TOKEN }}

- name: get latest dynamic lists
id: getDynamicLists
run: |
echo "::set-output name=lists::$(curl -s https://b.rucss.wp-rocket.me/api/exclusions/list)"
- name: Save Default Lists
- name: Get and Save Default Lists
id: saveDynamicLists
uses: jsdaniell/create-json@1.1.2
uses: engahmeds3ed/create-json[email protected]
with:
name: "dynamic-lists.json"
json: ${{ steps.getDynamicLists.outputs.lists }}
url: "https://b.rucss.wp-rocket.me/api/exclusions/list"
dir: '/'

- name: Commit Default Lists JSON file
if: ${{ steps.saveDynamicLists.outcome == 'success' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: update dynamic lists
commit_user_name: WP Media GitHub Actions Bot

- name: get latest incompatible plugins lists
id: getIncompatiblePluginsLists
run: |
echo "::set-output name=lists::$(curl -s https://b.rucss.wp-rocket.me/api/incompatible-plugins/list)"
- name: Save IncompatiblePlugins Lists
- name: Get and save incompatible plugins lists
id: saveIncompatiblePluginsLists
uses: jsdaniell/create-json@1.1.2
uses: engahmeds3ed/create-json[email protected]
with:
name: "dynamic-lists-incompatible-plugins.json"
json: ${{ steps.getIncompatiblePluginsLists.outputs.lists }}
url: "https://b.rucss.wp-rocket.me/api/incompatible-plugins/list"
dir: '/'

- name: Commit IncompatiblePlugins JSON file
if: ${{ steps.saveIncompatiblePluginsLists.outcome == 'success' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: update incompatible plugins dynamic lists
commit_user_name: WP Media GitHub Actions Bot

- name: get latest DelayJS lists
id: getDynamicDelayJSLists
run: |
echo "::set-output name=lists::$(curl -s https://b.rucss.wp-rocket.me/api/delay-js-exclusions/list)"
- name: Save DelayJS Lists
- name: Get and Save DelayJS Lists
id: saveDynamicDelayJSLists
uses: jsdaniell/create-json@1.1.2
uses: engahmeds3ed/create-json[email protected]
with:
name: "dynamic-lists-delayjs.json"
json: ${{ steps.getDynamicDelayJSLists.outputs.lists }}
url: "https://b.rucss.wp-rocket.me/api/delay-js-exclusions/list"
dir: '/'

- name: Commit DelayJS JSON file
if: ${{ steps.saveDynamicDelayJSLists.outcome == 'success' }}
- name: Commit All lists JSON files
if: ${{ steps.saveDynamicLists.outcome == 'success' || steps.saveDynamicDelayJSLists.outcome == 'success' || steps.saveIncompatiblePluginsLists.outcome == 'success' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: update delay JS dynamic lists
commit_message: update dynamic lists
commit_user_name: WP Media GitHub Actions Bot
2 changes: 1 addition & 1 deletion dynamic-lists-delayjs.json

Large diffs are not rendered by default.

0 comments on commit b73125b

Please sign in to comment.