Skip to content

Commit

Permalink
Implement
Browse files Browse the repository at this point in the history
  • Loading branch information
Roshick authored and Rieb, Elias committed Jan 13, 2025
1 parent 8591c96 commit d0faad8
Show file tree
Hide file tree
Showing 98 changed files with 12,646 additions and 2 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Build

on:
push: {}

jobs:
build:
name: 📦 Build & Test
runs-on: ubuntu-latest
outputs:
image: ${{ steps.meta.outputs.tags }}
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch,pattern=snapshot-{{sha}}
labels: |
org.opencontainers.image.source=git@github.com:${{ github.repository }}.git
org.opencontainers.image.version=${{ github.head_ref || github.ref_name }}
org.opencontainers.image.revision=${{ github.sha }}
- id: build-push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# release:
# name: 🚀 Release
# if: github.ref == 'refs/heads/main'
# needs: build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - id: semantic-release
# uses: go-semantic-release/action@v1
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# prerelease: false
# allow-initial-development-versions: true # remove to trigger an initial 1.0.0 release
# changelog-generator-opt: "emojis=true"
# hooks: goreleaser
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - id: repository-id
# uses: ASzc/change-string-case-action@v6
# with:
# string: ${{ github.repository }}
# - if: steps.semantic-release.outputs.version != ''
# run: |
# TARGET=ghcr.io/${{ steps.repository-id.outputs.lowercase }}:${{ steps.semantic-release.outputs.version }}
# SOURCE=${{ needs.build.outputs.image }}
#
# docker pull $SOURCE
# docker tag $SOURCE $TARGET
# docker push $TARGET
#
49 changes: 49 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
*jar

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work

# IntelliJ project files
*.iml
*.iws
*.ipr
.idea/

# Eclipse project file
.settings/
.classpath
.project

# NetBeans specific
nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml

# OS
.DS_Store

# Project specific
local-config.yaml
node_modules/
6 changes: 6 additions & 0 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
preset: angular
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- "@semantic-release/changelog"
- "@semantic-release/git"
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ARG GOLANG_VERSION=1

FROM golang:${GOLANG_VERSION} AS build

COPY . /app
WORKDIR /app

ARG CGO_ENABLED=0
ARG GOOS=linux
ARG GOARCH=amd64

RUN go build main.go \
&& go test -v ./... \
&& go vet ./...

FROM scratch

COPY --from=build /app/main /main
COPY --from=build /etc/ssl/certs /etc/ssl/certs
COPY --from=build /app/api/openapi.yaml /api/openapi.yaml

ENTRYPOINT ["/main"]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Elias R.
Copyright (c) 2025 Elias R.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# under-construction
# ToDos

1. Improve API spec
2. Implement missing endpoints
3. Tests
4. Improve error handling
5. Support OCI
6. Support configurable filesystems (memory + disk)
Loading

0 comments on commit d0faad8

Please sign in to comment.