commit 74a02a6910a08dcd849a194b8f079fd82090ef4e Author: Roger Sikorski Date: Sat Apr 11 21:53:30 2026 +0200 Initial commit diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..0697a10 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +quote_type = single + +[{Makefile,**.mk}] +indent_style = tab diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..e63e967 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,89 @@ +# replace example for right image name + +name: Docker Build Workflow + +on: + push: + +jobs: + dockerfile_lint: + name: Lint Dockerfile + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: hadolint/hadolint-action@v3.1.0 + with: + dockerfile: Dockerfile + + build: + name: Build and Push Docker Image + runs-on: ubuntu-latest + container: + image: docker:dind + + steps: + - name: Set up nodejs + id: nodejs + shell: sh + run: | + apk add nodejs + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set Docker Build Tag + id: set_tag + run: | + # Default Docker tag + DOCKER_TAG="latest" + + # If this is a Git tag, use it + if [[ "${GITHUB_REF}" == refs/tags/* ]]; then + DOCKER_TAG="${GITHUB_REF#refs/tags/}" + fi + + echo "GIT_TAG=$DOCKER_TAG" >> $GITHUB_ENV + + - name: Set up Docker Context for Buildx + id: buildx-context + shell: sh + run: | + docker context use builders || docker context create builders + apk add nodejs + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + version: latest + endpoint: builders + + - name: Login to gitea.sikorski.cloud + uses: docker/login-action@v3 + with: + registry: gitea.sikorski.cloud + username: rogersik + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Docker Meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ secrets.REGISTRY_URL }} + flavor: | + latest=false + tags: | + type=sha,prefix=,format=short + type=ref,event=tag + + - name: Build and Push Docker Image + uses: docker/build-push-action@v6 + env: + ACTIONS_RUNTIME_TOKEN: '' + with: + pull: true + push: true + labels: ${{ steps.meta.outputs.labels }} + provenance: false + tags: gitea.sikorski.cloud/rogersik/example:${{ env.GIT_TAG }} + build-args: | + GIT_TAG=${{ env.GIT_TAG }} diff --git a/.hadolint.yaml b/.hadolint.yaml new file mode 100644 index 0000000..c07797f --- /dev/null +++ b/.hadolint.yaml @@ -0,0 +1,3 @@ +ignored: + - DL3008 # no need to pin versions + - DL3018 # no need to pin versions diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..76acc51 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "EditorConfig.EditorConfig", + // Code formatter using prettier + "esbenp.prettier-vscode" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..36be7a5 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true, + "editor.formatOnPaste": false +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ca55b56 --- /dev/null +++ b/Dockerfile @@ -0,0 +1 @@ +FROM ubuntu:24.04