Skip to content

Commit

Permalink
Add sorting step to action
Browse files Browse the repository at this point in the history
  • Loading branch information
garritfra committed Nov 7, 2023
1 parent b7391cb commit 5054ae1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/pr_fixup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ jobs:
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}

- name: Prettify code
- name: Format entries
uses: mikefarah/yq@v4.35.2
with:
cmd: yq --inplace 'sort_by(.domain)' _data/sites.yml
- name: Add back newline between entries
run: |
sed -i 's/- domain:/\n- domain:/g' _data/sites.yml
- name: Format and commit code
uses: creyD/prettier_action@v4.3
with:
# This part is also where you can pass other options, for example:
Expand Down
9 changes: 5 additions & 4 deletions _data/sites.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
- domain: 0chris.com
url: https://www.0chris.com/
size: 4.3
last_checked: 2022-03-20

- domain: 0xedward.io
url: https://0xedward.io/
size: 6.2
last_checked: 2022-05-13
- domain: 0chris.com
url: https://www.0chris.com/
size: 4.3
last_checked: 2022-03-20


- domain: 0xff.nu
url: https://0xff.nu/
Expand Down

0 comments on commit 5054ae1

Please sign in to comment.