From c76b4550d05015343f4c9d68bc16ebd79e66d036 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 03:55:36 +0100 Subject: [PATCH] Upgrade: [Actions] Bump the actions group with 4 updates (#317) Bumps the actions group with 4 updates: [actions/checkout](https://github.com/actions/checkout), [openttd/actions](https://github.com/openttd/actions), [actions/setup-python](https://github.com/actions/setup-python) and [github/codeql-action](https://github.com/github/codeql-action). Updates `actions/checkout` from 3 to 4 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) Updates `openttd/actions` from 2 to 5 - [Release notes](https://github.com/openttd/actions/releases) - [Commits](https://github.com/openttd/actions/compare/v2...v5) Updates `actions/setup-python` from 4 to 5 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4...v5) Updates `github/codeql-action` from 2 to 3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: openttd/actions dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/commit-checker.yml | 29 +++------------------------ .github/workflows/regression.yml | 10 +++++----- .github/workflows/release.yml | 30 ++++++++++++++-------------- .github/workflows/testing.yml | 29 +++++++++++---------------- 4 files changed, 35 insertions(+), 63 deletions(-) diff --git a/.github/workflows/commit-checker.yml b/.github/workflows/commit-checker.yml index 05e31502..511e6f3b 100644 --- a/.github/workflows/commit-checker.yml +++ b/.github/workflows/commit-checker.yml @@ -10,35 +10,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 4 - name: Get pull-request commits - run: | - # actions/checkout did a merge checkout of the pull-request. As such, the first - # commit is the merge commit. This means that on HEAD^ is the base branch, and - # on HEAD^2 are the commits from the pull-request. We now check if those trees - # have a common parent. If not, we fetch a few more commits till we do. In result, - # the log between HEAD^ and HEAD^2 will be the commits in the pull-request. - DEPTH=4 - while [ -z "$(git merge-base HEAD^ HEAD^2)" ]; do - git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --deepen=${DEPTH} origin HEAD - DEPTH=$(( ${DEPTH} * 4 )) - done - - # Just to show which commits we are going to evaluate. - echo "Commits in this pull-request:" - git log --oneline HEAD^..HEAD^2 - - - name: Checkout commit-checker - uses: actions/checkout@v3 - with: - repository: OpenTTD/OpenTTD-git-hooks - path: git-hooks - ref: master + uses: OpenTTD/actions/checkout-pull-request@v5 - name: Check commits - run: | - HOOKS_DIR=./git-hooks/hooks GIT_DIR=.git ./git-hooks/hooks/check-commits.sh HEAD^..HEAD^2 - echo "Commit checks passed" + uses: OpenTTD/OpenTTD-git-hooks@main diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index e43f23d7..34766ba0 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -25,17 +25,17 @@ jobs: python-version: pypy3.7 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 2 - name: Checkout tags - uses: openttd/actions/checkout@v2 - with: - with-tags: true + shell: bash + run: | + git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: 'pip' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4f0bf6d9..fca70965 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,17 +10,17 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Checkout tags - uses: openttd/actions/checkout@v2 - with: - with-tags: true + shell: bash + run: | + git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.x' cache: 'pip' @@ -50,17 +50,17 @@ jobs: runs-on: macOS-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Checkout tags - uses: openttd/actions/checkout@v2 - with: - with-tags: true + shell: bash + run: | + git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.x' cache: 'pip' @@ -90,17 +90,17 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Checkout tags - uses: openttd/actions/checkout@v2 - with: - with-tags: true + shell: bash + run: | + git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.x' cache: 'pip' diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 97a52ada..2427c396 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -14,20 +14,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python 3.8 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: Install dependencies run: python -m pip install -e . - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: python queries: security-and-quality - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 testing: name: Python 3.x on ${{ matrix.os }} @@ -38,10 +38,10 @@ jobs: os: [ubuntu-latest, macOS-latest, windows-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.x' cache: 'pip' @@ -61,23 +61,18 @@ jobs: flake8: name: Flake8 - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Flake8 - uses: TrueBrain/actions-flake8@v2 - with: - path: nml + uses: OpenTTD/actions/.github/workflows/rw-py-flake8.yml@v5 + with: + python-path: nml black: name: Black runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 - - name: Set up Python 3.6 - uses: actions/setup-python@v4 + uses: actions/checkout@v4 + - name: Set up Python 3.7 + uses: actions/setup-python@v5 with: python-version: 3.7 - name: Black