Skip to content

Commit b73125b

Browse files
Prototype: Test a new GitHub action for json (#6088)
Co-authored-by: engahmeds3ed <[email protected]> Co-authored-by: Vasilis Manthos <[email protected]> Co-authored-by: vmanthos <[email protected]>
1 parent cb7dd13 commit b73125b

File tree

2 files changed

+13
-42
lines changed

2 files changed

+13
-42
lines changed

.github/workflows/deploy_dynamic_lists_fallback.yml

+12-41
Original file line numberDiff line numberDiff line change
@@ -31,62 +31,33 @@ jobs:
3131
with:
3232
token: ${{ secrets.GH_WORKFLOW_TOKEN }}
3333

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

47-
- name: Commit Default Lists JSON file
48-
if: ${{ steps.saveDynamicLists.outcome == 'success' }}
49-
uses: stefanzweifel/git-auto-commit-action@v4
50-
with:
51-
commit_message: update dynamic lists
52-
commit_user_name: WP Media GitHub Actions Bot
53-
54-
- name: get latest incompatible plugins lists
55-
id: getIncompatiblePluginsLists
56-
run: |
57-
echo "::set-output name=lists::$(curl -s https://b.rucss.wp-rocket.me/api/incompatible-plugins/list)"
58-
59-
- name: Save IncompatiblePlugins Lists
42+
- name: Get and save incompatible plugins lists
6043
id: saveIncompatiblePluginsLists
61-
uses: jsdaniell/create-json@1.1.2
44+
uses: engahmeds3ed/create-json[email protected]
6245
with:
6346
name: "dynamic-lists-incompatible-plugins.json"
64-
json: ${{ steps.getIncompatiblePluginsLists.outputs.lists }}
47+
url: "https://b.rucss.wp-rocket.me/api/incompatible-plugins/list"
6548
dir: '/'
6649

67-
- name: Commit IncompatiblePlugins JSON file
68-
if: ${{ steps.saveIncompatiblePluginsLists.outcome == 'success' }}
69-
uses: stefanzweifel/git-auto-commit-action@v4
70-
with:
71-
commit_message: update incompatible plugins dynamic lists
72-
commit_user_name: WP Media GitHub Actions Bot
73-
74-
- name: get latest DelayJS lists
75-
id: getDynamicDelayJSLists
76-
run: |
77-
echo "::set-output name=lists::$(curl -s https://b.rucss.wp-rocket.me/api/delay-js-exclusions/list)"
78-
79-
- name: Save DelayJS Lists
50+
- name: Get and Save DelayJS Lists
8051
id: saveDynamicDelayJSLists
81-
uses: jsdaniell/create-json@1.1.2
52+
uses: engahmeds3ed/create-json[email protected]
8253
with:
8354
name: "dynamic-lists-delayjs.json"
84-
json: ${{ steps.getDynamicDelayJSLists.outputs.lists }}
55+
url: "https://b.rucss.wp-rocket.me/api/delay-js-exclusions/list"
8556
dir: '/'
8657

87-
- name: Commit DelayJS JSON file
88-
if: ${{ steps.saveDynamicDelayJSLists.outcome == 'success' }}
58+
- name: Commit All lists JSON files
59+
if: ${{ steps.saveDynamicLists.outcome == 'success' || steps.saveDynamicDelayJSLists.outcome == 'success' || steps.saveIncompatiblePluginsLists.outcome == 'success' }}
8960
uses: stefanzweifel/git-auto-commit-action@v4
9061
with:
91-
commit_message: update delay JS dynamic lists
62+
commit_message: update dynamic lists
9263
commit_user_name: WP Media GitHub Actions Bot

dynamic-lists-delayjs.json

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)