Skip to content

Commit 2ea2be5

Browse files
committed
Initial commit
0 parents  commit 2ea2be5

2 files changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/docker.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Docker Build & Push
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- "v*.*.*"
9+
10+
jobs:
11+
build-and-push:
12+
name: Build & Push Docker Image
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
submodules: recursive
19+
20+
- uses: docker/setup-buildx-action@v3
21+
22+
- uses: docker/login-action@v3
23+
with:
24+
username: ${{ github.repository_owner }}
25+
password: ${{ secrets.DOCKERHUB_TOKEN }}
26+
27+
- name: Build and push latest (main branch only)
28+
if: github.ref == 'refs/heads/main'
29+
uses: docker/build-push-action@v6
30+
with:
31+
context: .
32+
platforms: &platforms linux/amd64,linux/arm64
33+
push: true
34+
tags: ${{ github.repository }}:latest
35+
36+
- name: Build and push semver tag (tags only)
37+
if: startsWith(github.ref, 'refs/tags/v')
38+
uses: docker/build-push-action@v6
39+
with:
40+
context: .
41+
platforms: *platforms
42+
push: true
43+
tags: ${{ github.repository }}:${{ github.ref_name }}

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM python:3-alpine
2+
RUN apk add git nodejs npm
3+
&& pip install --no-cache-dir pylint isort gitlint flake8==5.0.4 flake8-typing-imports flake8-quotes
4+
&& npm install -g markdownlint-cli htmlhint
5+
WORKDIR /workspace
6+
CMD ["/bin/sh"]

0 commit comments

Comments
 (0)