From 9db545b27b608975125f66557f3cbb86a9839b8a Mon Sep 17 00:00:00 2001 From: ziteh Date: Sun, 15 Sep 2024 15:28:55 +0800 Subject: [PATCH 1/3] docs: add CHANGELOG --- CHANGELOG.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d3f1267 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +Types of changes: + +- **Added** for new features. +- **Changed** for changes in existing functionality. +- **Deprecated** for soon-to-be removed features. +- **Removed** for now removed features. +- **Fixed** for any bug fixes. +- **Security** in case of vulnerabilities. + +## Unreleased + +## [0.1.0-alpha.1] - 2024-09-15 + +First release. + +[0.1.0-alpha.1]: https://github.com/ziteh/hie/releases/tag/v0.1.0-alpha.1 From 63984c2c70527451e634919f0a8fb3b01c1c0916 Mon Sep 17 00:00:00 2001 From: ziteh Date: Sun, 15 Sep 2024 15:53:57 +0800 Subject: [PATCH 2/3] docs: add usage for docker --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 81c9ba8..160bfb7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,24 @@ Hie - ***Hi***erarchical tag-based image ***E***xplorer. ## Usage +### Develop + ```sh pnpm install pnpm run dev ``` + +### Docker + +Check [`Dockerfile`](./Dockerfile). + +```sh +# Build +docker build -t hie . + +# Run and expose port 5888 on the host +docker run -d --name hie -p 5888:3000 -v :/app/data hie + +# Save image +docker save -o hie.tar hie +``` From 60c4d3f5bc7d18376cf9099c2ba0bb21f54b98db Mon Sep 17 00:00:00 2001 From: ziteh Date: Sun, 15 Sep 2024 16:13:33 +0800 Subject: [PATCH 3/3] chore: add GitHub action for Docker image --- .github/workflows/docker-image.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..35a4031 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,26 @@ +name: Docker Image CI + +on: + workflow_dispatch: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build + run: docker build -t hie:$(date +%s) . + + - name: Run + run: | + docker run -d --name hie -p 5888:3000 hie:$(date +%s) + sleep 10 + + - name: Test + run: | + curl --silent --fail http://localhost:5888 || exit 1