-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
17 changed files
with
1,458 additions
and
1 deletion.
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,11 @@ | ||
.github | ||
.vscode | ||
example | ||
modules/__pycache__ | ||
.dockerignore | ||
.env | ||
.git | ||
.gitignore | ||
Dockerfile | ||
Pipfile | ||
Pipfile.lock |
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,17 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "04:00" # 13:00(UTC+9) | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "04:00" # 13:00(UTC+9) | ||
- package-ecosystem: "docker" | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "04:00" # 13:00(UTC+9) |
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,24 @@ | ||
name: 'Merge Dependencies' | ||
|
||
on: | ||
pull_request_target: | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
auto-merge: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} | ||
steps: | ||
- name: 'Enable auto-merge on PR' | ||
run: gh pr merge --auto --squash "$PR_URL" | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: 'Approve PR' | ||
run: gh pr review --approve "$PR_URL" | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
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,27 @@ | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
docker-build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check Out Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64,linux/arm/v7 | ||
push: false |
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,47 @@ | ||
name: publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '.github/**' | ||
- '.vscode/**' | ||
- '.example.env' | ||
- 'LICENSE' | ||
- 'README.md' | ||
|
||
jobs: | ||
docker-build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check Out Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64,linux/arm/v7 | ||
push: true | ||
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/oura-exporter:latest | ||
|
||
# - name: Restart Docker on RaspberryPi | ||
# uses: benc-uk/workflow-dispatch@v1.2.2 | ||
# with: | ||
# repo: legnoh/life-dashboard | ||
# workflow: Reset docker-compose setting | ||
# token: ${{ secrets.PERSONAL_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
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,16 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "main", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "main.py", | ||
"console": "integratedTerminal", | ||
"envFile": "${workspaceFolder}/.env" | ||
} | ||
] | ||
} |
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,15 @@ | ||
FROM python:3-slim-buster | ||
|
||
WORKDIR /usr/src/app | ||
COPY Pipfile Pipfile.lock ${WORKDIR} | ||
|
||
RUN pip3 install --upgrade pip && \ | ||
pip3 install pipenv --no-cache-dir && \ | ||
pipenv install --system --deploy && \ | ||
pip3 uninstall -y pipenv virtualenv-clone virtualenv | ||
|
||
COPY . ${WORKDIR} | ||
|
||
EXPOSE 8000 | ||
|
||
CMD [ "python3", "./main.py" ] |
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,18 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
requests = "*" | ||
prometheus-client = "*" | ||
pyyaml = "*" | ||
dacite = "*" | ||
|
||
[dev-packages] | ||
|
||
[requires] | ||
python_version = "3" | ||
|
||
[scripts] | ||
main = "python3 main.py" |
Oops, something went wrong.