Skip to content

Commit

Permalink
CI updates
Browse files Browse the repository at this point in the history
This is done by the automated script named upgrade-c2cciutils-to-1.7
  • Loading branch information
sbrunner committed Oct 13, 2023
1 parent f9e0c7a commit 2f72c4a
Show file tree
Hide file tree
Showing 7 changed files with 601 additions and 37 deletions.
33 changes: 26 additions & 7 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,45 @@
baseBranches: ['master', '3.16', '3.22', '3.28-gdal3.6', '3.30', '3.32'],
'pre-commit': { enabled: true },
regexManagers: [
/** Do updates on pre-commit additional dependencies */
{
fileMatch: ['^.pre-commit-config.yaml$'],
fileMatch: ['^\\.pre\\-commit\\-config\\.yaml$'],
matchStrings: [" +- '?(?<depName>[^' @=]+)(@|==)(?<currentValue>[^' @=]+)'? # (?<datasource>.+)"],
},
/** Do update on the schema present in the ci/config.yaml */
{
fileMatch: ['^ci/config\\\\.yaml$'],
fileMatch: ['^ci/config\\.yaml$'],
matchStrings: [
'.*https://raw\\\\.githubusercontent\\\\.com/(?<depName>[^\\\\s]+)/(?<currentValue>[0-9\\\\.]+)/.*',
'.*https://raw\\.githubusercontent\\.com/(?<depName>[^\\s]+)/(?<currentValue>[0-9\\.]+)/.*',
],
datasourceTemplate: 'github-tags',
},
/** Do update on packages update (trigger a rebuild) */
{
fileMatch: ['^ci/dpkg\\-versions\\.yaml$'],
matchStrings: [" *(?<depName>[^'\\s]+): '?(?<currentValue>[^'\\s/]*[0-9][^'\\s/]*)'?"],
datasourceTemplate: 'repology',
versioningTemplate: 'loose',
},
],
packageRules: [
/** Less strict version for Docker images */
{
matchDatasources: ['docker'],
versioning: 'loose',
},
/** Automerge the patch, the minor and the dev dependency */
/** Auto merge the dev dependency update */
{
matchDepTypes: ['devDependencies'],
automerge: true,
},
/** Group the patch and the minor */
/** Group and auto merge the patch updates */
{
matchUpdateTypes: ['patch'],
groupName: 'all patch versions',
automerge: true,
},
/** Group and auto merge the minor updates */
{
matchUpdateTypes: ['minor'],
groupName: 'all minor versions',
Expand All @@ -69,12 +79,13 @@
separateMajorMinor: false,
separateMinorPatch: false,
},
/** Accept only the patch on the stabilization branches */
/** Accept only the patch on stabilization branches */
{
matchBaseBranches: ['/3\\..*/'],
matchBaseBranches: ['/^[0-9]+\\.[0-9]+$/'],
matchUpdateTypes: ['major', 'minor', 'pin', 'digest', 'lockFileMaintenance', 'rollback', 'bump'],
enabled: false,
},
/** 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+)$',
Expand All @@ -85,5 +96,13 @@
matchPackageNames: ['python'],
enabled: false,
},
/** Update dpkg versions at any time */
{
matchBaseBranches: ['/^[0-9]+\\.[0-9]+$/'],
matchPaths: ['^ci/dpkg\\-versions\\.yaml$'],
schedule: ['at any time'],
groupName: 'dpkg',
automerge: true,
},
],
}
12 changes: 7 additions & 5 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
if: github.event_name == 'push' && github.ref_type == 'tag'
- name: Create release
run: |
run: |-
if [[ ${{ github.ref_name }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
gh release create ${{ github.ref_name }} --generate-notes || true
fi
Expand All @@ -27,23 +27,25 @@ jobs:

- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y%m%d%H%M%S")" >> $GITHUB_OUTPUT
run: echo "date=$(/bin/date -u "+%Y%m%d%H%M%S")" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: .cache
key: automation-${{ steps.get-date.outputs.date }}
restore-keys: |
restore-keys: |+
automation-
- run: docker pull aeonphp/automation
- name: Generate changelog
run: >
run: >-
docker run --env=AEON_AUTOMATION_GH_TOKEN --rm --volume=$(pwd)/.cache:/cache aeonphp/automation
changelog:generate:all
${{ github.repository }}
--github-release-update
--cache-path=/cache
--skip-from=dependabot-preview[bot]
--skip-from=dependabot[bot]
--skip-from=renovate[bot]
-v
env:
AEON_AUTOMATION_GH_TOKEN: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/dependency-auto-review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Auto reviews updates

on:
pull_request:
types:
- opened
- reopened

jobs:
auto-merge:
name: Auto reviews updates
runs-on: ubuntu-22.04
timeout-minutes: 5

steps:
- uses: actions/github-script@v6
with:
script: |-
github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
event: 'APPROVE',
})
if: github.event.pull_request.user.login == 'renovate[bot]'
22 changes: 0 additions & 22 deletions .github/workflows/dependency-update-review.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
SKIP: poetry-lock
- run: git diff && false
if: failure()
- name: Checks
run: c2cciutils-checks
- name: Print environment information
run: c2cciutils-env

- name: Cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion ci/config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/camptocamp/c2cciutils/1.5.8/c2cciutils/schema.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/camptocamp/c2cciutils/1.6.10/c2cciutils/schema.json

version:
branch_to_version_re:
Expand Down
Loading

0 comments on commit 2f72c4a

Please sign in to comment.