-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
227 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Binary-release | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
generate: | ||
name: Create release-artifacts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@master | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 'stable' | ||
- run: go version | ||
|
||
- uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Dev-Docker | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
IMAGE_NAME: exercisediary | ||
TAGS: dev | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build and Push Docker Image to docker.io | ||
uses: mr-smithers-excellent/docker-build-push@v5 | ||
with: | ||
image: ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }} | ||
tags: ${{ env.TAGS }} | ||
registry: docker.io | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Main-Docker | ||
|
||
on: | ||
workflow_dispatch: | ||
# push: | ||
# branches: [ "main" ] | ||
# paths: | ||
# - 'Dockerfile' | ||
# - 'src/**' | ||
|
||
env: | ||
IMAGE_NAME: exercisediary | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get version tag from env file | ||
uses: c-py/action-dotenv-to-setenv@v2 | ||
with: | ||
env-file: .version | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to GHCR | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||
push: true | ||
tags: | | ||
${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest | ||
${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} | ||
ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest | ||
ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Readme-DockerHub | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ "main" ] | ||
paths: | ||
- 'README.md' | ||
|
||
env: | ||
IMAGE_NAME: exercisediary | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Sync README.md to DockerHub | ||
uses: ms-jpq/sync-dockerhub-readme@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
repository: ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }} | ||
readme: "./README.md" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
[![Main-Docker](https://github.com/aceberg/exercisediary/actions/workflows/main-docker.yml/badge.svg)](https://github.com/aceberg/exercisediary/actions/workflows/main-docker.yml) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/aceberg/exercisediary)](https://goreportcard.com/report/github.com/aceberg/exercisediary) | ||
[![Maintainability](https://api.codeclimate.com/v1/badges/e8f67994120fc7936aeb/maintainability)](https://codeclimate.com/github/aceberg/exercisediary/maintainability) | ||
![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/aceberg/exercisediary) | ||
|
||
<h1><a href="https://github.com/aceberg/exercisediary"> | ||
<img src="https://raw.githubusercontent.com/aceberg/exercisediary/main/assets/logo.png" width="35" /> | ||
</a>Exercise Diary</h1> | ||
|
||
Light and easy workout diary | ||
|
||
- [Quick start](https://github.com/aceberg/exercisediary#quick-start) | ||
- [Config](https://github.com/aceberg/exercisediary#config) | ||
- [Options](https://github.com/aceberg/exercisediary#options) | ||
- [Thanks](https://github.com/aceberg/exercisediary#thanks) | ||
|
||
|
||
![Screenshot](https://raw.githubusercontent.com/aceberg/exercisediary/main/assets/Screenshot%202023-04-02%20at%2022-27-40%20Resource%20Diary.png) | ||
|
||
## Quick start | ||
|
||
```sh | ||
docker run --name exercisediary \ | ||
-e "TZ=Asia/Novosibirsk" \ | ||
-v ~/.dockerdata/ExerciseDiary:/data/ExerciseDiary \ | ||
-p 8851:8851 \ | ||
aceberg/exercisediary | ||
``` | ||
<!-- Or use [docker-compose.yml](docker-compose.yml) --> | ||
|
||
|
||
## Config | ||
|
||
|
||
Configuration can be done through config file or environment variables | ||
|
||
| Variable | Description | Default | | ||
| -------- | ----------- | ------- | | ||
| HOST | Listen address | 0.0.0.0 | | ||
| PORT | Port for web GUI | 8851 | | ||
| THEME | Any theme name from https://bootswatch.com in lowcase | grass | | ||
| COLOR | Background color: light or dark | light | | ||
| TZ | Set your timezone for correct time | "" | | ||
|
||
## Options | ||
|
||
| Key | Description | Default | | ||
| -------- | ----------- | ------- | | ||
| -c | Path to config file | /data/exercisediary/config.yaml | | ||
|
||
## Thanks | ||
- All go packages listed in [dependencies](https://github.com/aceberg/exercisediary/network/dependencies) | ||
- [Bootstrap](https://getbootstrap.com/) | ||
- Themes: [Free themes for Bootstrap](https://bootswatch.com) | ||
- Favicon and logo: [Flaticon](https://www.flaticon.com/icons/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters