Skip to content

Commit

Permalink
meh
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluscream committed Aug 18, 2024
1 parent 4aba534 commit c7b427a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 28 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/generate-sitemap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,8 @@ jobs:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: Check for any changed html files
id: check-for-changed-html
uses: tj-actions/changed-files@main
with:
files: '*.html'

- name: Generate the sitemap
continue-on-error: true
if: steps.check-for-changed-html.outputs.any_changed == 'true'
id: sitemap
uses: cicirello/generate-sitemap@v1
with:
Expand All @@ -41,7 +34,6 @@ jobs:

- name: Output stats
continue-on-error: true
if: steps.check-for-changed-html.outputs.any_changed == 'true'
run: |
echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}"
echo "url-count = ${{ steps.sitemap.outputs.url-count }}"
Expand All @@ -56,7 +48,6 @@ jobs:

- name: Push sitemap.xml
continue-on-error: true
if: steps.check-for-changed-html.outputs.any_changed == 'true'
uses: stefanzweifel/git-auto-commit-action@master
with:
commit_message: "[bot] Generate sitemap.xml"
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/sort_sources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,8 @@ jobs:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: Check for any changed html files
id: check-for-changed-sources
uses: tj-actions/changed-files@main
with:
files: '/sources.json'

- name: Sort JSON
continue-on-error: true
if: steps.check-for-changed-sources.outputs.any_changed == 'true'
uses: yakubique/json-utils@main
id: sorted_sources
with:
Expand All @@ -46,15 +39,14 @@ jobs:
input: 'sources.json'

- name: Move sorted JSON
if: steps.check-for-changed-sources.outputs.any_changed == 'true'
continue-on-error: true
run: |
cp "${{ steps.sorted_sources.outputs.result }}" sources.json
git add sources.json
# git commit -m "Sort sources.json"
# git push
- name: Push sorted JSON
if: steps.check-for-changed-sources.outputs.any_changed == 'true'
continue-on-error: true
uses: stefanzweifel/git-auto-commit-action@master
with:
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/validate-changed-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Validate changed Github workflows
workflow_dispatch: null
push:
paths:
- '/sources.json'
- '.github/workflows/**.yml'
pull_request:
paths:
- '/sources.json'
- '.github/workflows/**.yml'
permissions: read-all
jobs:
validate:
Expand All @@ -19,16 +19,9 @@ jobs:
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- name: Check for any changed workflows
id: check-for-changed-workflows
uses: tj-actions/changed-files@main
with:
files: |
.github/workflows/**.yml
fetch-depth: 0
- name: Validate workflows
continue-on-error: true
if: steps.check-for-changed-workflows.outputs.any_changed == 'true'
uses: dsanders11/json-schema-validate-action@main
with:
schema: https://json.schemastore.org/github-workflow.json
Expand Down

0 comments on commit c7b427a

Please sign in to comment.