ci: add build timeout to all jobs

This commit is contained in:
sebthom
2025-02-10 18:51:54 +01:00
parent 2402ba2572
commit ec7ffedcd6
4 changed files with 15 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# SPDX-ArtifactOfProjectHomePage: https://github.com/Second-Hand-Friends/kleinanzeigen-bot
#
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions
name: Build
on:
@@ -79,6 +79,7 @@ jobs:
PUBLISH_RELEASE: true
runs-on: ${{ matrix.os }} # https://github.com/actions/runner-images#available-images
timeout-minutes: 10
steps:
- name: "Show: GitHub context"
@@ -112,7 +113,7 @@ jobs:
uses: pdm-project/setup-pdm@v4
with:
python-version: "${{ matrix.PYTHON_VERSION }}"
cache: ${{ !startsWith(matrix.os, 'macos') }} # https://github.com/pdm-project/setup-pdm/issues/55
cache: ${{ !startsWith(matrix.os, 'macos') }} # https://github.com/pdm-project/setup-pdm/issues/55
- name: "Install: Python dependencies"
@@ -252,6 +253,7 @@ jobs:
publish-release:
###########################################################
runs-on: ubuntu-latest
timeout-minutes: 5
needs:
- build
if: (github.ref_name == 'main' || github.ref_name == 'release') && !github.event.act
@@ -341,7 +343,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: ${{ steps.release.outputs.name }}
COMMIT_MSG: | # https://stackoverflow.com/a/78420438/5116073
COMMIT_MSG: | # https://stackoverflow.com/a/78420438/5116073
${{ github.event.head_commit.message }}
---
@@ -385,6 +387,7 @@ jobs:
needs: build
if: github.event_name == 'pull_request' && github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
@@ -404,6 +407,7 @@ jobs:
needs: build
if: github.event_name == 'pull_request' && github.actor == 'kleinanzeigen-bot-tu[bot]' && github.head_ref == 'dependencies/pdm'
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write

View File

@@ -30,7 +30,7 @@ defaults:
shell: bash
env:
PYTHON_VERSION: "3.12"
PYTHON_VERSION: "3.13.2"
jobs:
@@ -38,6 +38,7 @@ jobs:
analyze:
###########################################################
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
security-events: write
@@ -50,7 +51,7 @@ jobs:
uses: actions/checkout@v4 # https://github.com/actions/checkout
- name: "Install Python and PDM" # https://github.com/pdm-project/setup-pdm
- name: "Install Python and PDM" # https://github.com/pdm-project/setup-pdm
uses: pdm-project/setup-pdm@v4
with:
python-version: "${{ env.PYTHON_VERSION }}"

View File

@@ -1,4 +1,4 @@
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions
name: Stale issues
on:
@@ -14,6 +14,7 @@ permissions:
jobs:
stale:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Git checkout

View File

@@ -2,7 +2,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# SPDX-ArtifactOfProjectHomePage: https://github.com/Second-Hand-Friends/kleinanzeigen-bot/
#
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions
name: Update Python Dependencies
on:
@@ -25,6 +25,7 @@ jobs:
update-python-deps:
###########################################################
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: "Show: GitHub context"
@@ -38,7 +39,7 @@ jobs:
- name: Generate GitHub Access Token
uses: tibdex/github-app-token@v2 #https://github.com/tibdex/github-app-token
uses: tibdex/github-app-token@v2 # https://github.com/tibdex/github-app-token
id: generate_token
# see https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens
with: