diff --git a/.github/actions/build-environment/Dockerfile b/.github/actions/build-environment/Dockerfile index cbc57cc..e06da3c 100644 --- a/.github/actions/build-environment/Dockerfile +++ b/.github/actions/build-environment/Dockerfile @@ -1 +1 @@ -FROM mltooling/build-environment:0.6.12 \ No newline at end of file +FROM mltooling/build-environment:0.6.18 \ No newline at end of file diff --git a/.github/pr-labeler-file-path.yml b/.github/pr-labeler-file-path.yml index ed20524..d85b37d 100644 --- a/.github/pr-labeler-file-path.yml +++ b/.github/pr-labeler-file-path.yml @@ -1,20 +1,23 @@ # Add documentation label to any change in documentation related files documentation: - - "docs/*" - - "docs/**/*" - - "README.md" - - "**/README.md" - - "CONTRIBUTING.md" +- any: + - changed-files: + - any-glob-to-any-file: [ + "docs/**/*", # All files, including subfolders + "README.md", + "**/README.md", + "CONTRIBUTING.md", + ] maintenance: - - ".vscode/*" - - ".vscode/**/*" - - ".github/*" - - ".github/**/*" - - ".reuse/*" - - "LICENSES/*" - - ".editorconfig" - - ".gitignore" - - "**/.gitignore" - - "build.py" - - "**/build.py" +- any: + - changed-files: + - any-glob-to-any-file: [ + ".vscode/**/*", # All files, including subfolders + ".github/**/*", # All files, including subfolders + ".reuse/*", + "LICENSES/*", + ".editorconfig", + "**/.gitignore", + "build.py", + ] diff --git a/.github/workflows/build-pipeline.yml b/.github/workflows/build-pipeline.yml index 8132ea7..fcfbc64 100644 --- a/.github/workflows/build-pipeline.yml +++ b/.github/workflows/build-pipeline.yml @@ -32,7 +32,7 @@ jobs: # Set host ip to env variable to be uside within container actions - name: set-host-ip run: echo "_HOST_IP=$(hostname -I | cut -d ' ' -f 1)" >> $GITHUB_ENV - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: run-build-scripts uses: ./.github/actions/build-environment with: diff --git a/.github/workflows/close-stale-issues.yml b/.github/workflows/close-stale-issues.yml index 4945c64..532713e 100644 --- a/.github/workflows/close-stale-issues.yml +++ b/.github/workflows/close-stale-issues.yml @@ -9,11 +9,14 @@ jobs: close-stale-issues: runs-on: ubuntu-latest steps: - - uses: actions/stale@v3 + - uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: "This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days" - stale-pr-message: "This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days" - days-before-stale: 90 - days-before-close: 14 - stale-pr-label: stale + stale-issue-message: "This issue is stale because it has been open 182 days with no activity. Remove stale label or comment or this will be closed in 28 days" + stale-pr-message: "This PR is stale because it has been open 182 days with no activity. Remove stale label or comment or this will be closed in 28 days" + close-issue-message: "Issue was closed due to inactivity." + close-pr-message: "PR was closed due to inactivity." + days-before-stale: 182 + days-before-close: 28 + stale-pr-label: "stale" + stale-issue-label: "stale" diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 1526ca6..871e9de 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -1,21 +1,24 @@ name: pr-labeler on: - - pull_request_target + pull_request_target: + types: [opened] jobs: pr-labeler: runs-on: ubuntu-latest + permissions: + contents: read # for TimonVS/pr-labeler-action to read config file + pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR steps: - - uses: actions/labeler@main + - uses: actions/labeler@v5 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/pr-labeler-file-path.yml # workaround for problem: https://github.com/wesnoth/wesnoth/commit/958c82d0867568057caaf58356502ec8c87d8366 sync-labels: false - - uses: TimonVS/pr-labeler-action@v3 + - uses: TimonVS/pr-labeler-action@v5 with: - configuration-path: .github/pr-labeler-branch-name.yml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.GITHUB_TOKEN }} + configuration-path: .github/pr-labeler-branch-prefix.yml # Evaluate: https://github.com/srvaroa/labeler diff --git a/.github/workflows/release-pipeline.yml b/.github/workflows/release-pipeline.yml index 0508849..8b8b29b 100644 --- a/.github/workflows/release-pipeline.yml +++ b/.github/workflows/release-pipeline.yml @@ -43,15 +43,15 @@ jobs: apt-get install -y git - if: ${{ env.GITHUB_TOKEN != null && env.GITHUB_TOKEN != '' }} name: create-release-branch - uses: peterjgrainger/action-create-branch@v2.0.1 + uses: peterjgrainger/action-create-branch@v3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: branch: "${{ env.BRANCH_PREFIX }}${{ env.VERSION }}" - if: ${{ ! (env.GITHUB_TOKEN != null && env.GITHUB_TOKEN != '') }} - uses: actions/checkout@v2 + uses: actions/checkout@v4 - if: ${{ env.GITHUB_TOKEN != null && env.GITHUB_TOKEN != '' }} - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ env.BRANCH_PREFIX }}${{ env.VERSION }} @@ -89,7 +89,7 @@ jobs: container_registry_password: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }} - if: ${{ env.GITHUB_TOKEN != null && env.GITHUB_TOKEN != '' }} name: push-changes - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: branch: ${{ env.BRANCH_PREFIX }}${{ env.VERSION }} commit_user_name: Release Bot @@ -117,7 +117,7 @@ jobs: run: echo "The release drafter currently does not work with act, please create the release from the Github UI." - if: ${{ env.GITHUB_ACTOR != 'nektos/act' && env.GITHUB_TOKEN != null && env.GITHUB_TOKEN != '' }} name: checkout-fixed-release-drafter - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: ml-tooling/release-drafter path: ./.git/cloned-actions/release-drafter diff --git a/setup.cfg b/setup.cfg index 5d06956..1811b77 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,11 +7,16 @@ universal = false [flake8] ignore = - E203, # space before : (needed for how black formats slicing) - # E266, # too many leading '#' for block comment - E501, # line too long - E731, # do not assign a lambda expression, use a def - W503, # line break before binary operator + # space before : (needed for how black formats slicing) + E203, + # too many leading '#' for block comment + # E266, + # line too long + E501, + # do not assign a lambda expression, use a def + E731, + # line break before binary operator + W503, max-line-length = 88 # select = B,C,E,F,W,T4,B9 # max-complexity = 18