Skip to content

Commit

Permalink
Merge pull request #977 from camptocamp/update-example
Browse files Browse the repository at this point in the history
Update example
  • Loading branch information
sbrunner authored Jan 26, 2023
2 parents f9c790e + b93d179 commit 27ec20c
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 3 deletions.
6 changes: 4 additions & 2 deletions example-project/.github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
extends: ['config:base'],
timezone: 'Europe/Zurich',
schedule: 'before 1am on Sunday',
schedule: 'on the first day of the month',
labels: ['dependencies'],
separateMajorMinor: true,
separateMinorPatch: true,
lockFileMaintenance: { enabled: true, automerge: true },
prHourlyLimit: 0,
prConcurrentLimit: 0,
lockFileMaintenance: { enabled: true, automerge: true, schedule: 'on the first day of the month' },
regexManagers: [
{
fileMatch: ['^ci/dpkg-versions.yaml$'],
Expand Down
2 changes: 1 addition & 1 deletion example-project/.github/workflows/audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
- name: Audit
run: ~/.venv/bin/c2cciutils-audit --branch=${{ matrix.branch }}
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }}
52 changes: 52 additions & 0 deletions example-project/.github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Changelog Generator

on:
schedule:
- cron: '0 0 * * 1'
push:
tags:
- '*.*.*'

jobs:
changelog:
name: Changelog Generator
runs-on: ubuntu-22.04
timeout-minutes: 30

steps:
- uses: actions/checkout@v3
if: github.event_name == 'push' && github.ref_type == 'tag'
- name: Create release
run: |
if [[ ${{ github.ref_name }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
gh release create ${{ github.ref_name }} --generate-notes || true
fi
if: github.event_name == 'push' && github.ref_type == 'tag'
env:
GH_TOKEN: ${{ github.token }}

- name: Get Date
id: get-date
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: |
automation-
- run: docker pull aeonphp/automation
- name: Generate changelog
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 }}
20 changes: 20 additions & 0 deletions example-project/.github/workflows/delete-old-workflows-run.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Delete old workflow runs

on:
schedule:
- cron: '0 0 * * *'

jobs:
build:
runs-on: ubuntu-20.04
timeout-minutes: 25
name: Delete old workflow runs

steps:
- name: Delete old workflow runs
uses: MajorScruffy/delete-old-workflow-runs@v0.3.0
with:
repository: ${{ github.repository }}
older-than-seconds: 43200000 # 500 days
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions example-project/.github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ jobs:
run: c2cciutils-pull-request-checks
env:
GITHUB_EVENT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }}
16 changes: 16 additions & 0 deletions example-project/.prospector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ pycodestyle:
max-line-length: 110
disable:
- E203 # whitespace before ':'
- E231 # missing whitespace after ','
- E501 # line too long
- E641 # at least two spaces before inline comment
- E261 # at least two spaces before inline comment
- E302 # expected 2 blank lines, found 1
- W293 # blank line contains whitespace

pydocstyle:
disable:
- D102 # missing docstring in public method
- D200 # one-line docstring should fit on one line with quotes
- D202 # no blank lines after function docstring
- D203 # 1 blank line required before class docstring
- D204 # 1 blank line required after class docstring
- D212 # multi-line docstring summary should start at the first line
- D213 # multi-line docstring summary should start at the second line

mypy:
run: true
Expand Down

0 comments on commit 27ec20c

Please sign in to comment.