Skip to content

Commit

Permalink
This is done by the automated script named upgrade-c2cciutils-to-1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jun 5, 2024
1 parent 5812212 commit 836f464
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 114 deletions.
10 changes: 4 additions & 6 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,15 @@
},
/** Group Poetry packages */
{
matchPackageNames: ['poetry', 'pip'],
matchPackagePrefixes: ['poetry-'],
groupName: 'Poetry',
automerge: true,
separateMajorMinor: false,
separateMinorPatch: false,
matchDepNames: ['poetry', 'pip'],
},
/** Support the 4 parts of shellcheck-py version with a v prefix */
{
matchPackageNames: ['shellcheck-py/shellcheck-py'],
versioning: 'regex:^v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)\\.(?<build>\\d+)$',
matchDepNames: ['shellcheck-py/shellcheck-py'],
},
/** Accept only the patch on stabilization branches */
{
Expand All @@ -91,14 +89,14 @@
/** Disable upgrading the supported Python version */
{
matchFileNames: ['pyproject.toml'],
matchPackageNames: ['python'],
enabled: false,
matchDepNames: ['python'],
},
/** Don't allows update on ubuntu:mantic-* Docker images */
{
matchPackageNames: ['ubuntu'],
matchNewValue: '!/^[0-9][0-9]\\.[0-9][0-9]$/',
enabled: false,
matchDepNames: ['ubuntu'],
},
],
}
22 changes: 0 additions & 22 deletions .github/workflows/backport.yaml

This file was deleted.

15 changes: 8 additions & 7 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ jobs:
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
- run: git diff
- run: git diff --exit-code --patch > /tmp/pre-commit.patch || true
if: failure()
- run: git diff --patch > /tmp/pre-commit.patch || true
if: failure()
Expand Down Expand Up @@ -84,10 +82,13 @@ jobs:
- name: Publish
run: c2cciutils-publish
if: env.HAS_SECRETS == 'HAS_SECRETS'
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
- run: git diff --patch ci/dpkg-versions.yaml > /tmp/dpkg.patch
- run: git diff --exit-code --patch > /tmp/dpkg-versions.patch || true
if: failure()
- uses: actions/upload-artifact@v4
with:
name: Update dpkg versions list.patch
path: /tmp/dpkg-versions.patch
retention-days: 1
if: failure()
- uses: actions/upload-artifact@v4
with:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/pr-checks.yaml

This file was deleted.

60 changes: 19 additions & 41 deletions .github/workflows/pull-request-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,23 @@ jobs:
with:
script: |-
console.log(context);
- name: Auto reviews GHCI updates
uses: actions/github-script@v7
with:
script: |-
github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
event: 'APPROVE',
})
if: |-
startsWith(github.head_ref, 'ghci/audit/')
&& (github.event.pull_request.user.login == 'ghci-test[bot]'
|| github.event.pull_request.user.login == 'ghci-int[bot]'
|| github.event.pull_request.user.login == 'ghci[bot]')
&& (github.event.action == 'opened'
|| github.event.action == 'reopened')
- name: Auto reviews Renovate updates
uses: actions/github-script@v7
with:
Expand All @@ -40,7 +57,7 @@ jobs:
github.event.pull_request.user.login == 'renovate[bot]'
&& (github.event.action == 'opened'
|| github.event.action == 'reopened')
- name: Auto review and merge snyk auto fix
- name: Auto review and merge dpkg updates
uses: actions/github-script@v7
with:
script: |-
Expand All @@ -66,45 +83,6 @@ jobs:
`)
if: |-
github.event.pull_request.user.login == 'c2c-bot-gis-ci-2'
&& startsWith(github.head_ref, 'snyk-fix/')
&& (github.event.action == 'opened'
|| github.event.action == 'reopened')
- name: Restart audit workflow
uses: actions/github-script@v7
with:
script: |-
let runs = await github.rest.actions.listWorkflowRuns({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'audit.yaml',
per_page: 1,
});
runs = runs.data.workflow_runs;
if (runs.length == 1 && runs[0].status != 'success') {
console.log(`Rerun workflow ${runs[0].id} ${runs[0].status}`);
github.rest.actions.reRunWorkflowFailedJobs({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: runs[0].id,
});
}
if: |-
github.event.pull_request.user.login == 'c2c-bot-gis-ci-2'
&& (startsWith(github.head_ref, 'snyk-fix/')
|| startsWith(github.head_ref, 'dpkg-update/'))
&& github.event.action == 'closed'
&& github.event.pull_request.merged == true
- name: Auto close pre-commit.ci autoupdate
uses: actions/github-script@v7
with:
script: |-
github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
state: 'closed',
});
if: |-
github.event.pull_request.user.login == 'pre-commit-ci'
&& startsWith(github.head_ref, 'dpkg-update/')
&& (github.event.action == 'opened'
|| github.event.action == 'reopened')
34 changes: 25 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ repos:
- id: jsonschema-gentypes
files: |-
(?x)^(
github_app_geo_project/project-schema\.json
|github_app_geo_project/application-schema\.json
|github_app_geo_project/module/.*/schema\.json
|github_app_geo_project/module/.*/.*-schema\.json
github_app_geo_project/project-schema\.json
|github_app_geo_project/application-schema\.json
|github_app_geo_project/module/.*/schema\.json
|github_app_geo_project/module/.*/.*-schema\.json
)$
- repo: https://github.com/sbrunner/jsonschema2md
rev: 1.2.0
Expand Down Expand Up @@ -175,9 +175,25 @@ repos:
- id: jsonschema-validator
files: |-
(?x)^(
ci/config\.yaml
|github_app_geo_project/project-schema\.json
|github_app_geo_project/application-schema\.json
|github_app_geo_project/module/.*/schema\.json
|github_app_geo_project/module/.*/.*-schema\.json
ci/config\.yaml
|github_app_geo_project/project-schema\.json
|github_app_geo_project/application-schema\.json
|github_app_geo_project/module/.*/schema\.json
|github_app_geo_project/module/.*/.*-schema\.json
)$
- repo: https://github.com/mheap/json-schema-spell-checker
rev: main
hooks:
- id: json-schema-spell-checker
files: |-
(?x)^(
github_app_geo_project/module/audit/schema\.json
|github_app_geo_project/module/delete_old_workflow_runs/schema\.json
|github_app_geo_project/module/versions/schema\.json
)$
args:
- --fields=description,title
- --spelling=.github/spell-ignore-words.txt
- --ignore-numbers
- --ignore-acronyms
- --en-us

0 comments on commit 836f464

Please sign in to comment.