Skip to content

Commit

Permalink
ci: run only when file change
Browse files Browse the repository at this point in the history
  • Loading branch information
shaokeyibb authored and Enter-tainer committed Jul 18, 2024
1 parent d6252a9 commit 602f6c6
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/deploy-cloudflare-workers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,29 @@ on:
push:
tags:
- "*"
paths:
- cloudflare-workers/**
workflow_dispatch:

jobs:
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
src:
- 'cloudflare-workers/**'
deploy:
name: Deploy
needs: changes
if: ${{ needs.changes.outputs.src == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/publish-python-markdown-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,30 @@ name: Publish python-markdown-extension to Pypi
on:
push:
tags:
- '*'
paths:
- python-markdown-extension/**
- "*"
workflow_dispatch:

jobs:
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
src:
- 'python-markdown-extension/**'
publish:
name: Publish
needs: changes
if: ${{ needs.changes.outputs.src == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
Expand Down

0 comments on commit 602f6c6

Please sign in to comment.