diff --git a/example-project/.github/workflows/auto-review.yaml b/example-project/.github/workflows/auto-review.yaml index 078d41a0c..342c350ff 100644 --- a/example-project/.github/workflows/auto-review.yaml +++ b/example-project/.github/workflows/auto-review.yaml @@ -10,7 +10,7 @@ on: jobs: auto-merge: name: Auto reviews updates - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 5 steps: diff --git a/example-project/.github/workflows/backport.yaml b/example-project/.github/workflows/backport.yaml index 11ba6385c..2d6c29aa4 100644 --- a/example-project/.github/workflows/backport.yaml +++ b/example-project/.github/workflows/backport.yaml @@ -12,7 +12,7 @@ env: jobs: backport: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Backport timeout-minutes: 5 diff --git a/example-project/.github/workflows/clean.yaml b/example-project/.github/workflows/clean.yaml index 3fcbca711..3b533db2f 100644 --- a/example-project/.github/workflows/clean.yaml +++ b/example-project/.github/workflows/clean.yaml @@ -5,7 +5,7 @@ on: delete jobs: clean: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Clean Docker hub tags timeout-minutes: 5 diff --git a/example-project/.github/workflows/codeql.yaml b/example-project/.github/workflows/codeql.yaml deleted file mode 100644 index 97b8f9866..000000000 --- a/example-project/.github/workflows/codeql.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: CodeQL scanning - -on: - push: - -env: - HAS_SECRETS: ${{ secrets.HAS_SECRETS }} - -jobs: - codeql: - name: CodeQL scanning - runs-on: ubuntu-20.04 - timeout-minutes: 20 - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - if: env.HAS_SECRETS == 'HAS_SECRETS' - - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: python - if: env.HAS_SECRETS == 'HAS_SECRETS' - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 - if: env.HAS_SECRETS == 'HAS_SECRETS' diff --git a/example-project/.github/workflows/delete-old-workflows-run.yaml b/example-project/.github/workflows/delete-old-workflows-run.yaml index b0360c575..a298bb206 100644 --- a/example-project/.github/workflows/delete-old-workflows-run.yaml +++ b/example-project/.github/workflows/delete-old-workflows-run.yaml @@ -6,7 +6,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 25 name: Delete old workflow runs diff --git a/example-project/.github/workflows/main.yaml b/example-project/.github/workflows/main.yaml index 3b1ca68a8..e51502fab 100644 --- a/example-project/.github/workflows/main.yaml +++ b/example-project/.github/workflows/main.yaml @@ -15,7 +15,7 @@ env: jobs: main: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Continuous integration timeout-minutes: 20 if: "!startsWith(github.event.head_commit.message, '[skip ci] ')" @@ -35,6 +35,18 @@ jobs: - run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH} - run: python3 -m pip install --user --requirement=ci/requirements.txt + - uses: actions/cache@v3 + with: + path: ~/.cache/pre-commit + key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} + restore-keys: "pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}\npre-commit-" + - run: pre-commit run --all-files + env: + SKIP: poetry-lock + if: matrix.python-version != '3.7' + - run: git diff && false + if: failure() + - name: Checks run: c2cciutils-checks diff --git a/example-project/.github/workflows/pr-checks.yaml b/example-project/.github/workflows/pr-checks.yaml index 2979128bd..220cb5630 100644 --- a/example-project/.github/workflows/pr-checks.yaml +++ b/example-project/.github/workflows/pr-checks.yaml @@ -7,13 +7,13 @@ on: - reopened - labeled - unlabeled - - edit + - edited - synchronize jobs: build: name: Pull request check - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 5 steps: diff --git a/example-project/ci/requirements.txt b/example-project/ci/requirements.txt index d89c3eea8..0201903ed 100644 --- a/example-project/ci/requirements.txt +++ b/example-project/ci/requirements.txt @@ -1 +1,2 @@ c2cciutils[checks,publish]==1.5.2 +pre-commit==3.2.1