Skip to content

Commit de56fcf

Browse files
authored
Merge branch 'master' into master
2 parents e174c0d + a0fdae3 commit de56fcf

18 files changed

+1875
-1144
lines changed

.circleci/config.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.gitchangelog.rc

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
#
2+
# Format
3+
#
4+
# ACTION: [AUDIENCE:] COMMIT_MSG [@TAG ...]
5+
#
6+
# Description
7+
#
8+
# ACTION is one of 'chg', 'fix', 'new'
9+
#
10+
# Is WHAT the change is about.
11+
#
12+
# 'chg' is for refactor, small improvement, cosmetic changes...
13+
# 'fix' is for bug fixes
14+
# 'new' is for new features, big improvement
15+
#
16+
# SUBJECT is optional and one of 'dev', 'usr', 'pkg', 'test', 'doc'
17+
#
18+
# Is WHO is concerned by the change.
19+
#
20+
# 'dev' is for developpers (API changes, refactors...)
21+
# 'usr' is for final users (UI changes)
22+
# 'pkg' is for packagers (packaging changes)
23+
# 'test' is for testers (test only related changes)
24+
# 'doc' is for doc guys (doc only changes)
25+
#
26+
# COMMIT_MSG is ... well ... the commit message itself.
27+
#
28+
# TAGs are additionnal adjective as 'refactor' 'minor' 'cosmetic'
29+
#
30+
# 'refactor' is obviously for refactoring code only
31+
# 'minor' is for a very meaningless change (a typo, adding a comment)
32+
# 'cosmetic' is for cosmetic driven change (re-indentation, 80-col...)
33+
#
34+
# Example:
35+
#
36+
# new: usr: support of bazaar implemented
37+
# chg: re-indentend some lines @cosmetic
38+
# new: dev: updated code to be compatible with last version of killer lib.
39+
# fix: pkg: updated year of licence coverage.
40+
# new: test: added a bunch of test around user usability of feature X.
41+
# fix: typo in spelling my name in comment. @minor
42+
#
43+
# Please note that multi-line commit message are supported, and only the
44+
# first line will be considered as the "summary" of the commit message. So
45+
# tags, and other rules only applies to the summary. The body of the commit
46+
# message will be displayed in the changelog with minor reformating.
47+
48+
#
49+
# ``ignore_regexps`` is a line of regexps
50+
#
51+
# Any commit having its full commit message matching any regexp listed here
52+
# will be ignored and won't be reported in the changelog.
53+
#
54+
ignore_regexps = [
55+
r'(?i)^(Merge pull request|Merge branch|Release|Update)',
56+
]
57+
58+
59+
#
60+
# ``replace_regexps`` is a dict associating a regexp pattern and its replacement
61+
#
62+
# It will be applied to get the summary line from the full commit message.
63+
#
64+
# Note that you can provide multiple replacement patterns, they will be all
65+
# tried. If None matches, the summary line will be the full commit message.
66+
#
67+
replace_regexps = {
68+
# current format (ie: 'chg: dev: my commit msg @tag1 @tag2')
69+
70+
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n@]*)(@[a-z]+\s+)*$':
71+
r'\4',
72+
}
73+
74+
75+
# ``section_regexps`` is a list of 2-tuples associating a string label and a
76+
# list of regexp
77+
#
78+
# Commit messages will be classified in sections thanks to this. Section
79+
# titles are the label, and a commit is classified under this section if any
80+
# of the regexps associated is matching.
81+
#
82+
section_regexps = [
83+
('New', [
84+
r'^[nN]ew\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
85+
]),
86+
('Changes', [
87+
r'^[cC]hg\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
88+
]),
89+
('Fix', [
90+
r'^[fF]ix\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
91+
]),
92+
('Other', None # Match all lines
93+
),
94+
95+
]
96+
97+
# ``body_split_regexp`` is a regexp
98+
#
99+
# Commit message body (not the summary) if existing will be split
100+
# (new line) on this regexp
101+
#
102+
body_split_regexp = r'[\n-]'
103+
104+
105+
# ``tag_filter_regexp`` is a regexp
106+
#
107+
# Tags that will be used for the changelog must match this regexp.
108+
#
109+
# tag_filter_regexp = r'^[0-9]+$'
110+
tag_filter_regexp = r'^(?:[vV])?[0-9\.]+$'
111+
112+
113+
# ``unreleased_version_label`` is a string
114+
#
115+
# This label will be used as the changelog Title of the last set of changes
116+
# between last valid tag and HEAD if any.
117+
unreleased_version_label = "%%version%% (unreleased)"

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "13:00"
8+
groups:
9+
python-packages:
10+
patterns:
11+
- "*"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: automatic-release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_type:
7+
description: Release type
8+
required: true
9+
type: choice
10+
options:
11+
- patch
12+
- minor
13+
- major
14+
15+
jobs:
16+
release:
17+
name: Release
18+
runs-on: ubuntu-22.04
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
ssh-key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
25+
- name: Setup Git
26+
run: |
27+
git config --local user.email "[email protected]"
28+
git config --local user.name "GitHub Action"
29+
- name: Setup Python
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: '3.8'
33+
- name: Install prerequisites
34+
run: pip install -r release-requirements.txt
35+
- name: Execute release
36+
env:
37+
SEMVER_BUMP: ${{ github.event.inputs.release_type }}
38+
TWINE_REPOSITORY: ${{ vars.TWINE_REPOSITORY }}
39+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
40+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
41+
run: ./release $SEMVER_BUMP

.github/workflows/docker.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: Create and publish a Docker image
7+
8+
on:
9+
push:
10+
branches:
11+
- 'master'
12+
- 'main'
13+
- 'dev'
14+
15+
tags:
16+
- 'v*'
17+
- 'v*.*'
18+
- 'v*.*.*'
19+
- '*'
20+
- '*.*'
21+
- '*.*.*'
22+
pull_request:
23+
branches:
24+
- 'main'
25+
- 'dev'
26+
27+
28+
env:
29+
REGISTRY: ghcr.io
30+
IMAGE_NAME: ${{ github.repository }}
31+
32+
jobs:
33+
build-and-push-image:
34+
runs-on: ubuntu-latest
35+
permissions:
36+
contents: read
37+
packages: write
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v3
42+
43+
- name: Set up QEMU
44+
uses: docker/setup-qemu-action@v2
45+
46+
- name: Set up Docker Buildx
47+
uses: docker/setup-buildx-action@v2
48+
49+
- name: Log in to the Container registry
50+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
51+
with:
52+
registry: ${{ env.REGISTRY }}
53+
username: ${{ github.actor }}
54+
password: ${{ secrets.GITHUB_TOKEN }}
55+
56+
- name: Extract metadata (tags, labels) for Docker
57+
id: meta
58+
uses: docker/metadata-action@v4
59+
with:
60+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
61+
tags: |
62+
type=semver,pattern={{version}}
63+
type=semver,pattern={{major}}.{{minor}}
64+
type=semver,pattern={{major}}
65+
type=sha
66+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
67+
68+
- name: Build and push Docker image
69+
uses: docker/build-push-action@v4
70+
with:
71+
context: .
72+
push: true
73+
platforms: linux/amd64,linux/arm64
74+
tags: ${{ steps.meta.outputs.tags }}
75+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/lint.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: "lint"
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
pull_request:
7+
branches:
8+
- "*"
9+
push:
10+
branches:
11+
- "main"
12+
- "master"
13+
14+
jobs:
15+
lint:
16+
name: lint
17+
runs-on: ubuntu-22.04
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
- name: Setup Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: "3.8"
28+
cache: "pip"
29+
- run: pip install -r release-requirements.txt && pip install wheel
30+
- run: flake8 --ignore=E501,E203,W503
31+
- run: black .
32+
- run: rst-lint README.rst
33+
- run: python setup.py sdist bdist_wheel && twine check dist/*
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: "tagged-release"
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
push:
7+
tags:
8+
- '*'
9+
10+
jobs:
11+
tagged-release:
12+
name: tagged-release
13+
runs-on: ubuntu-20.04
14+
15+
steps:
16+
- uses: "marvinpinto/[email protected]"
17+
with:
18+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
19+
prerelease: false

.gitignore

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ pkg
1818

1919
# Debian Files
2020
debian/files
21-
debian/python-aws-hostname*
21+
debian/python-github-backup*
2222

2323
# Sphinx build
2424
doc/_build
2525

2626
# Generated man page
27-
doc/aws_hostname.1
27+
doc/github_backup.1
2828

2929
# Annoying macOS files
3030
.DS_Store
@@ -34,4 +34,11 @@ doc/aws_hostname.1
3434
.vscode
3535
.atom
3636

37-
README
37+
README
38+
39+
# RSA
40+
id_rsa
41+
id_rsa.pub
42+
43+
# Virtual env
44+
venv

0 commit comments

Comments
 (0)