Skip to content

Commit

Permalink
add Helm chart (not finished)
Browse files Browse the repository at this point in the history
  • Loading branch information
auguwu committed Feb 20, 2024
1 parent d59afc9 commit 8d00470
Show file tree
Hide file tree
Showing 9 changed files with 260 additions and 212 deletions.
233 changes: 22 additions & 211 deletions .github/workflows/Release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ jobs:
target: ${{matrix.target}}

- name: Install `cross`
run: cargo install cross
uses: taiki-e/cache-cargo-install-action@v1
with:
tool: cross

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -193,17 +195,19 @@ jobs:
repository: auguwu/ume
readme-filepath: ./distribution/docker/README.md
docker-debian:
name: Build Docker Image (Debian) [${{matrix.platform}}]
name: Build Docker Image [${{matrix.dockerfile}}]
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
platform: [linux/amd64, linux/arm64]
dockerfile:
- ./distribution/docker/debian.Dockerfile
- ./distribution/docker/alpine.Dockerfile
include:
- platform: linux/amd64
suffix: amd64
- platform: linux/arm64
suffix: arm64
- dockerfile: ./distribution/docker/debian.Dockerfile
suffix: ""
- dockerfile: ./distribution/docker/alpine.Dockerfile
suffix: "-alpine"
steps:
- name: Checkout source code
uses: actions/checkout@v4
Expand Down Expand Up @@ -239,93 +243,22 @@ jobs:
uses: docker/build-push-action@v5
with:
provenance: false
platforms: ${{matrix.platform}}
cache-from: type=gha,scope=debian
cache-to: type=gha,scope=debian
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha
context: .
file: ./distribution/docker/debian.Dockerfile
file: ${{matrix.dockerfile}}
push: true
sbom: true
tags: |
ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-${{matrix.suffix}},
ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}-${{matrix.suffix}},
ghcr.io/auguwu/ume:${{steps.tag.outputs.version}}-${{matrix.suffix}},
ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}${{matrix.suffix}},
ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}${{matrix.suffix}},
ghcr.io/auguwu/ume:${{steps.tag.outputs.version}}${{matrix.suffix}},
ghcr.io/auguwu/ume:latest-${{matrix.suffix}}
auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-${{matrix.suffix}},
auguwu/ume:${{steps.tag.outputs.major}}-${{matrix.suffix}},
auguwu/ume:${{steps.tag.outputs.version}}-${{matrix.suffix}},
auguwu/ume:latest-${{matrix.suffix}}
labels: |
org.opencontainers.image.title=ume
org.opencontainers.image.description="🐻‍❄️💐 Easy, self-hostable, and flexible image host made in Rust"
org.opencontainers.image.version=${{steps.tag.outputs.version}}
org.opencontainers.image.revision=${{steps.commit-hash.outputs.commit}}
org.opencontainers.image.licenses=Apache-2.0
org.opencontainers.image.documentation=https://floofy.dev/oss/ume
org.opencontainers.image.source=https://github.com/auguwu/ume/tree/${{steps.commit-hash.outputs.commit}}
docker-alpine:
name: Build Docker Image (Alpine) [${{matrix.platform}}]
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
platform: [linux/amd64, linux/arm64]
include:
- platform: linux/amd64
suffix: amd64
- platform: linux/arm64
suffix: arm64
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Get Git tag
uses: auguwu/git-tag-action@master
id: tag

- name: Get commit hash
id: commit-hash
run: echo "commit=$(git rev-parse --short=8 $GITHUB_SHA)" >> $GITHUB_OUTPUT

- name: Login into Docker Hub
uses: docker/login-action@v3
with:
username: auguwu
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login into GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.repository_owner}}
password: ${{secrets.GH_TOKEN}}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push!
uses: docker/build-push-action@v5
with:
provenance: false
platforms: ${{matrix.platform}}
cache-from: type=gha,scope=alpine
cache-to: type=gha,scope=alpine
context: .
file: ./distribution/docker/alpine.Dockerfile
push: true
sbom: true
tags: |
ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-alpine-${{matrix.suffix}},
ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}-alpine-${{matrix.suffix}},
ghcr.io/auguwu/ume:${{steps.tag.outputs.version}}-alpine-${{matrix.suffix}},
ghcr.io/auguwu/ume:latest-alpine-${{matrix.suffix}}
auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-alpine-${{matrix.suffix}},
auguwu/ume:${{steps.tag.outputs.major}}-alpine-${{matrix.suffix}},
auguwu/ume:${{steps.tag.outputs.version}}-alpine-${{matrix.suffix}},
auguwu/ume:latest-alpine-${{matrix.suffix}}
auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}${{matrix.suffix}},
auguwu/ume:${{steps.tag.outputs.major}}${{matrix.suffix}},
auguwu/ume:${{steps.tag.outputs.version}}${{matrix.suffix}},
auguwu/ume:latest${{matrix.suffix}}
labels: |
org.opencontainers.image.title=ume
org.opencontainers.image.description="🐻‍❄️💐 Easy, self-hostable, and flexible image host made in Rust"
Expand All @@ -334,125 +267,3 @@ jobs:
org.opencontainers.image.licenses=Apache-2.0
org.opencontainers.image.documentation=https://floofy.dev/oss/ume
org.opencontainers.image.source=https://github.com/auguwu/ume/tree/${{steps.commit-hash.outputs.commit}}
manifests:
name: Docker Manifests
runs-on: ubuntu-latest
needs: [docker-alpine, docker-debian]
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Get Git tag
uses: auguwu/git-tag-action@master
id: tag

- name: Login into Docker Hub
uses: docker/login-action@v3
with:
username: auguwu
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login into GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.repository_owner}}
password: ${{secrets.GH_TOKEN}}

- name: Push manifest [auguwu/ume:latest]
uses: Noelware/[email protected]
with:
inputs: auguwu/ume:latest
images: auguwu/ume:latest-amd64,auguwu/ume:latest-arm64
push: true

- name: Push manifest [auguwu/ume:alpine]
uses: Noelware/[email protected]
with:
inputs: auguwu/ume:alpine
images: auguwu/ume:latest-alpine-amd64,auguwu/ume:latest-alpine-arm64
push: true

- name: Push manifest [auguwu/ume:${{steps.tag.outputs.major}}]
uses: Noelware/[email protected]
with:
inputs: auguwu/ume:${{steps.tag.outputs.major}}
images: auguwu/ume:${{steps.tag.outputs.major}}-amd64,auguwu/ume:${{steps.tag.outputs.major}}-arm64
push: true

- name: Push manifest [auguwu/ume:${{steps.tag.outputs.major}}-alpine]
uses: Noelware/[email protected]
with:
inputs: auguwu/ume:${{steps.tag.outputs.major}}-alpine
images: auguwu/ume:${{steps.tag.outputs.major}}-alpine-amd64,auguwu/ume:${{steps.tag.outputs.major}}-alpine-arm64
push: true

- name: Push manifest [auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}]
uses: Noelware/[email protected]
with:
inputs: auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}
images: auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-amd64,auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-arm64
push: true

- name: Push manifest [auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-alpine]
uses: Noelware/[email protected]
with:
inputs: auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-alpine
images: auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-alpine-amd64,auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-alpine-arm64
push: true

- name: Push manifest [auguwu/ume:${{steps.tag.outputs.version}}-alpine]
uses: Noelware/[email protected]
with:
inputs: auguwu/ume:${{steps.tag.outputs.version}}-alpine
images: auguwu/ume:${{steps.tag.outputs.version}}-alpine-amd64,auguwu/ume:${{steps.tag.outputs.version}}-alpine-arm64
push: true

- name: Push manifest [ghcr.io/auguwu/ume:latest]
uses: Noelware/[email protected]
with:
inputs: ghcr.io/auguwu/ume:latest
images: ghcr.io/auguwu/ume:latest-amd64,auguwu/ume:latest-arm64
push: true

- name: Push manifest [ghcr.io/auguwu/ume:alpine]
uses: Noelware/[email protected]
with:
inputs: ghcr.io/auguwu/ume:alpine
images: ghcr.io/auguwu/ume:latest-alpine-amd64,auguwu/ume:latest-alpine-arm64
push: true

- name: Push manifest [ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}]
uses: Noelware/[email protected]
with:
inputs: ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}
images: ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}-amd64,auguwu/ume:${{steps.tag.outputs.major}}-arm64
push: true

- name: Push manifest [ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}-alpine]
uses: Noelware/[email protected]
with:
inputs: ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}-alpine
images: ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}-alpine-amd64,auguwu/ume:${{steps.tag.outputs.major}}-alpine-arm64
push: true

- name: Push manifest [ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}]
uses: Noelware/[email protected]
with:
inputs: ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}
images: ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-amd64,auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-arm64
push: true

- name: Push manifest [ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-alpine]
uses: Noelware/[email protected]
with:
inputs: ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-alpine
images: ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-alpine-amd64,auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-alpine-arm64
push: true

- name: Push manifest [ghcr.io/auguwu/ume:${{steps.tag.outputs.version}}-alpine]
uses: Noelware/[email protected]
with:
inputs: ghcr.io/auguwu/ume:${{steps.tag.outputs.version}}-alpine
images: ghcr.io/auguwu/ume:${{steps.tag.outputs.version}}-alpine-amd64,auguwu/ume:${{steps.tag.outputs.version}}-alpine-arm64
push: true
Binary file added bun.lockb
Binary file not shown.
14 changes: 14 additions & 0 deletions distribution/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,19 @@ $ docker run --rm auguwu/ume ume -h
and will print the following:

```shell
🐻‍❄️💐 Easy, self-hostable, and flexible image host made in Rust

Usage: ume <COMMAND> [...ARGS]

Commands:
completions Generates shell completions for any shell. This doesn't support nushell or fig
screenshot Takes a screenshot with [Flameshot](https://flameshot.org)
server Starts a Ume server
help Print this message or the help of the given subcommand(s)
Options:
-l, --log-level <LEVEL> Configures the log level for all CLI-based commands. This will not configure the Ume server's log level when you run `ume server` [default: INFO]
-q, --quiet suppress all log output even when `--log-level` is specified
--no-progress disables the use of progress bars in `ume screenshot` to indicate that a file is uploading to the server [env: UME_NO_PROGRESSBAR=]
-h, --help Print help
```
1 change: 0 additions & 1 deletion distribution/helm/.gitkeep

This file was deleted.

38 changes: 38 additions & 0 deletions distribution/helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 🐻‍❄️💐 ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

kubeVersion: ">=1.26"
description: "🐻‍❄️💐 Easy, self-hostable, and flexible image host made in Rust"
apiVersion: v2
appVersion: "4.0.0"
version: 0.1.0
type: application
home: https://floofy.dev/oss/ume
name: ume
keywords:
- image-uploader
- file-uploader
maintainers:
- name: Noel Towa
email: [email protected]
url: https://floofy.dev
annotations:
charts.noelware.org/licenses: Apache-2.0
charts.noelware.org/maintainers: |
- user: noel
dependencies:
- name: common
version: 2.14.1
repository: oci://registry-1.docker.io/bitnamicharts
Loading

0 comments on commit 8d00470

Please sign in to comment.