Skip to content

Commit

Permalink
Build & Deploy docs GitHub Action: auto delete canceled (skyportal#5249)
Browse files Browse the repository at this point in the history
* Auto delete canceled build & deploy docs GitHub Action, simplify the "needs-migration?" labeler logic
  • Loading branch information
Theodlz authored Sep 5, 2024
1 parent 4854b5d commit 2432ebd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,15 @@ migration:
# Add 'needs-migration?' label to any change to models.py without changes to
# the Alembic versions
needs-migration?:
- any:
- changed-files:
- any-glob-to-any-file: ["skyportal/models.py", "skyportal/models/*"]
- all-globs-to-all-files: "!alembic/versions/*"
- all:
- changed-files:
- any-glob-to-any-file:
["baselayer/app/models.py", "baselayer/app/models/*"]
- all-globs-to-all-files: "!alembic/versions/*"
- changed-files:
- any-glob-to-any-file: ["requirements.txt"]
[
"skyportal/models.py",
"skyportal/models/*",
"baselayer/app/models.py",
"baselayer/app/models/*",
]
- all-globs-to-all-files: "!alembic/versions/*"

# Add 'workflows' label to any changes to GA workflows (.github folder)
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/build-and-deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-deploy-docs:
runs-on: ubuntu-latest
Expand All @@ -30,6 +34,10 @@ jobs:
--health-retries 5
steps:
- uses: "MercuryTechnologies/delete-cancelled-runs@f5c9d322d9c7afbd41f779199818c1ffe381d34b" #v1.0.0
with:
workflow-file: "build-and-deploy-docs.yaml"

- uses: actions/setup-python@v5
with:
python-version: "3.10"
Expand Down

0 comments on commit 2432ebd

Please sign in to comment.