Skip to content

Commit 68b7fc2

Browse files
🔥 Release v1.0.0 (#169)
Sync with new template Co-authored-by: ChristophShyper <[email protected]>
1 parent ae4d096 commit 68b7fc2

20 files changed

+895
-357
lines changed

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*
33

44
# Include
5+
!Dockerfile
6+
!entrypoint.sh
57
!LICENSE
68
!README.md
7-
!entrypoint.sh

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# EditorConfig helps developers define and maintain consistent coding styles
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
insert_final_newline = true
8+
indent_style = space
9+
indent_size = 2
10+
trim_trailing_whitespace = true

.github/dependabot.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,16 @@ version: 2
22
updates:
33
# Maintain dependencies for GitHub Actions
44
- package-ecosystem: github-actions
5-
directory: "/"
5+
directory: /
66
schedule:
7-
interval: daily
7+
interval: weekly
88
assignees:
99
- ChristophShyper
10-
labels:
11-
- automatic
1210

1311
# Enable version updates for Docker
1412
- package-ecosystem: docker
15-
directory: "/"
13+
directory: /
1614
schedule:
17-
interval: daily
15+
interval: weekly
1816
assignees:
1917
- ChristophShyper
20-
labels:
21-
- automatic

.github/workflows/pull-request.yml

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ name: Pull Request
33
on:
44
push:
55
branches-ignore:
6-
- 'master'
7-
- 'dependabot**'
6+
- master
7+
- dependabot/**
8+
9+
permissions:
10+
contents: read
11+
packages: write
12+
pull-requests: write
813

914
jobs:
1015
lint:
@@ -13,55 +18,56 @@ jobs:
1318
steps:
1419
- name: Checkout
1520
uses: actions/checkout@v5
21+
with:
22+
fetch-depth: 0
23+
fetch-tags: true
1624

17-
- name: Hadolint
18-
uses: hadolint/[email protected].0
25+
- name: Install Task
26+
uses: arduino/[email protected].0
1927
with:
20-
dockerfile: Dockerfile
28+
version: 3.x
2129

22-
build-test:
23-
name: Push test
24-
if: ${{ !startsWith(github.ref, 'refs/heads/doc') && !startsWith(github.ref, 'refs/heads/test') }}
30+
- name: Run linters
31+
run: task lint
32+
33+
build-and-push:
34+
name: Build and Push test
2535
runs-on: ubuntu-24.04-arm
36+
needs: [lint]
2637
steps:
2738
- name: Checkout
2839
uses: actions/checkout@v5
2940
with:
3041
fetch-depth: 0
42+
fetch-tags: true
43+
44+
- name: Install Task
45+
uses: arduino/[email protected]
46+
with:
47+
version: 3.x
3148

32-
- name: Extract branch name
33-
id: branch
34-
run: |
35-
if [ "${{ github.event_name }}" == "pull_request" ]; then
36-
BRANCH_NAME="${{ github.head_ref }}"
37-
else
38-
BRANCH_NAME="${GITHUB_REF#refs/heads/}"
39-
fi
40-
# Sanitize branch name for Docker tag (replace special chars with -)
41-
SANITIZED_BRANCH=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9._-]/-/g' | tr '[:upper:]' '[:lower:]')
42-
echo "name=$SANITIZED_BRANCH" >> $GITHUB_OUTPUT
43-
echo "Branch name: $BRANCH_NAME -> Docker tag: test-$SANITIZED_BRANCH"
44-
45-
- name: Docker Buildx
49+
- name: Install Docker Buildx
4650
uses: docker/setup-buildx-action@v3
4751
with:
4852
install: true
4953

50-
- name: QEMU
54+
- name: Install QEMU
5155
uses: docker/setup-qemu-action@v3
5256
with:
5357
image: tonistiigi/binfmt:latest
5458
platforms: amd64,arm64
5559

60+
- name: Get Docker commands
61+
run: task docker:cmds
62+
5663
- name: Build and push test image
5764
env:
58-
DOCKER_BUILDKIT: 1
5965
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
6066
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61-
VERSION: ${{ steps.branch.outputs.name }}
62-
VERSION_PREFIX: test-
63-
TERM: xterm-256color
64-
run: make push
67+
run: task docker:push
68+
69+
- name: Inspect image
70+
run: task docker:push:inspect
6571

6672
pull-request:
6773
name: Pull Request
@@ -71,12 +77,16 @@ jobs:
7177
uses: actions/checkout@v5
7278
with:
7379
fetch-depth: 0
80+
fetch-tags: true
81+
82+
- name: Install Task
83+
uses: arduino/[email protected]
84+
with:
85+
version: 3.x
7486

75-
- name: Template
87+
- name: Get template
7688
shell: bash
77-
run: |
78-
mkdir -p .tmp
79-
curl -LsS https://raw.githubusercontent.com/devops-infra/.github/master/PULL_REQUEST_TEMPLATE.md -o .tmp/PULL_REQUEST_TEMPLATE.md
89+
run: task git:get-pr-template
8090

8191
- name: Create Pull Request
8292
uses: devops-infra/[email protected]

.github/workflows/release.yml

Lines changed: 45 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: 'Release version (e.g., v1.2.3)'
7+
description: Release version (e.g., v1.2.3)
88
required: true
99
type: string
10+
default: __TAKEN_FROM_ACTION_YML__
11+
12+
permissions:
13+
contents: write
14+
packages: write
1015

1116
jobs:
1217
release:
@@ -17,109 +22,69 @@ jobs:
1722
uses: actions/checkout@v5
1823
with:
1924
fetch-depth: 0
25+
fetch-tags: true
2026

21-
- name: Validate version format
22-
run: |
23-
VERSION="${{ github.event.inputs.version }}"
24-
if [[ ! $VERSION =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
25-
echo "❌ Invalid version format. Use format: v1.2.3"
26-
exit 1
27-
fi
28-
echo "✅ Version format is valid: $VERSION"
29-
30-
- name: Check if version already exists
31-
run: |
32-
VERSION="${{ github.event.inputs.version }}"
33-
if git tag -l | grep -q "^${VERSION}$"; then
34-
echo "❌ Version $VERSION already exists"
35-
exit 1
36-
fi
37-
echo "✅ Version $VERSION is available"
38-
39-
- name: Create and push full tag
40-
run: |
41-
VERSION="${{ github.event.inputs.version }}"
42-
git config user.name "github-actions[bot]"
43-
git config user.email "github-actions[bot]@users.noreply.github.com"
44-
git tag -a "$VERSION" -m "$VERSION"
45-
git push origin "$VERSION"
27+
- name: Install Task
28+
uses: arduino/[email protected]
29+
with:
30+
version: 3.x
4631

47-
- name: Extract version components
32+
- name: Create and push git tags
4833
id: version
34+
env:
35+
VERSION_OVERRIDE: ${{ github.event.inputs.version }}
36+
VERSION_SUFFIX: ""
4937
run: |
50-
VERSION="${{ github.event.inputs.version }}"
51-
# Remove 'v' prefix and split version
52-
VERSION_NO_V="${VERSION#v}"
53-
MAJOR=$(echo "$VERSION_NO_V" | cut -d. -f1)
54-
MINOR=$(echo "$VERSION_NO_V" | cut -d. -f2)
55-
56-
echo "major=v$MAJOR" >> $GITHUB_OUTPUT
57-
echo "minor=v$MAJOR.$MINOR" >> $GITHUB_OUTPUT
58-
echo "✅ Extracted versions - Major: v$MAJOR, Minor: v$MAJOR.$MINOR"
59-
60-
- name: Create/update major version tag
61-
run: |
62-
MAJOR_TAG="${{ steps.version.outputs.major }}"
63-
64-
# Check if major tag exists
65-
if git tag -l | grep -q "^${MAJOR_TAG}$"; then
66-
echo "ℹ️ Major tag $MAJOR_TAG exists, updating it"
67-
git tag -d "$MAJOR_TAG" || true
68-
git push origin ":refs/tags/$MAJOR_TAG" || true
69-
else
70-
echo "✅ Major tag $MAJOR_TAG is new"
71-
fi
72-
73-
# Create/update major tag
74-
git tag -a "$MAJOR_TAG" -m "Major version $MAJOR_TAG"
75-
git push origin "$MAJOR_TAG"
76-
echo "✅ Created/updated major tag: $MAJOR_TAG"
77-
78-
- name: Create/update minor version tag
79-
run: |
80-
MINOR_TAG="${{ steps.version.outputs.minor }}"
81-
82-
# Check if minor tag exists
83-
if git tag -l | grep -q "^${MINOR_TAG}$"; then
84-
echo "ℹ️ Minor tag $MINOR_TAG exists, updating it"
85-
git tag -d "$MINOR_TAG" || true
86-
git push origin ":refs/tags/$MINOR_TAG" || true
87-
else
88-
echo "✅ Minor tag $MINOR_TAG is new"
89-
fi
90-
91-
# Create/update minor tag
92-
git tag -a "$MINOR_TAG" -m "Minor version $MINOR_TAG"
93-
git push origin "$MINOR_TAG"
94-
echo "✅ Created/updated minor tag: $MINOR_TAG"
38+
task git:set-config
39+
task version:tag-release
40+
echo "REL_VERSION=$(task version:get)" >> "$GITHUB_OUTPUT"
9541
96-
- name: Docker Buildx
42+
- name: Install Docker Buildx
9743
uses: docker/setup-buildx-action@v3
9844
with:
9945
install: true
10046

101-
- name: QEMU
47+
- name: Install QEMU
10248
uses: docker/setup-qemu-action@v3
10349
with:
10450
image: tonistiigi/binfmt:latest
10551
platforms: amd64,arm64
10652

53+
- name: Get Docker commands
54+
env:
55+
VERSION_OVERRIDE: ${{ github.event.inputs.version }}
56+
VERSION_SUFFIX: ""
57+
run: task docker:cmds
58+
10759
- name: Build and push Docker images
10860
env:
109-
DOCKER_BUILDKIT: 1
11061
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
11162
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112-
VERSION: ${{ github.event.inputs.version }}
113-
TERM: xterm-256color
114-
run: make push
63+
VERSION_OVERRIDE: ${{ github.event.inputs.version }}
64+
VERSION_SUFFIX: ""
65+
run: task docker:push
66+
67+
- name: Inspect image
68+
env:
69+
VERSION_OVERRIDE: ${{ github.event.inputs.version }}
70+
VERSION_SUFFIX: ""
71+
run: task docker:push:inspect
11572

11673
- name: Create GitHub Release
11774
uses: softprops/action-gh-release@v2
11875
with:
119-
tag_name: ${{ github.event.inputs.version }}
120-
name: ${{ github.event.inputs.version }}
76+
tag_name: ${{ steps.version.outputs.REL_VERSION }}
77+
name: ${{ steps.version.outputs.REL_VERSION }}
12178
draft: false
12279
prerelease: false
12380
generate_release_notes: true
12481
env:
12582
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
84+
- name: Update Docker Hub description
85+
uses: peter-evans/dockerhub-description@v5
86+
with:
87+
username: ${{ vars.DOCKER_USERNAME }}
88+
password: ${{ secrets.DOCKER_TOKEN }}
89+
repository: ${{ vars.DOCKER_ORG_NAME }}/${{ github.event.repository.name }}
90+
short-description: ${{ github.event.repository.description }}

.github/workflows/weekly-dependency-check.yml

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: Weekly Dependency Check
33
on:
44
schedule:
55
# Run every Monday at 08:00 UTC
6-
- cron: '0 8 * * 1'
6+
- cron: 0 8 * * 1
7+
8+
permissions:
9+
contents: read
10+
packages: write
711

812
jobs:
913
dependency-check:
@@ -14,36 +18,29 @@ jobs:
1418
uses: actions/checkout@v5
1519
with:
1620
fetch-depth: 0
21+
fetch-tags: true
22+
23+
- name: Install Task
24+
uses: arduino/[email protected]
25+
with:
26+
version: 3.x
1727

18-
- name: Get latest release tag
19-
id: latest-tag
20-
run: |
21-
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null)
22-
if [ -z "$LATEST_TAG" ]; then
23-
echo "❌ No release tags found in repository"
24-
echo "Please create at least one release before running dependency checks"
25-
exit 1
26-
fi
27-
echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT
28-
echo "Testing dependencies for tag: $LATEST_TAG"
29-
30-
- name: Docker Buildx
28+
- name: Install Docker Buildx
3129
uses: docker/setup-buildx-action@v3
3230
with:
3331
install: true
3432

35-
- name: QEMU
33+
- name: Install QEMU
3634
uses: docker/setup-qemu-action@v3
3735
with:
3836
image: tonistiigi/binfmt:latest
3937
platforms: amd64,arm64
4038

41-
- name: Build & push test image
42-
env:
43-
DOCKER_BUILDKIT: 1
44-
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
VERSION: ${{ steps.latest-tag.outputs.tag }}
47-
VERSION_PREFIX: test-
48-
TERM: xterm-256color
49-
run: make push
39+
- name: Get Docker commands
40+
run: task docker:cmds
41+
42+
- name: Build and push test image
43+
run: task docker:push
44+
45+
- name: Inspect image
46+
run: task docker:push:inspect

0 commit comments

Comments
 (0)