Compare commits
12 Commits
tomasztorc
...
tomasztorc
| Author | SHA1 | Date | |
|---|---|---|---|
|
95e856f5f7
|
|||
|
99f0c12455
|
|||
|
6b2ad223c7
|
|||
|
0330fddaf1
|
|||
|
399cce6a2e
|
|||
|
94be339a0a
|
|||
|
5069cfa039
|
|||
|
7ef9c4e614
|
|||
|
17e8a90f40
|
|||
|
edcde52192
|
|||
|
15d2634186
|
|||
|
09da459a53
|
24
.gitea/workflows/build-push-container.yaml
Normal file
24
.gitea/workflows/build-push-container.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
name: Build and push container
|
||||
run-name: Container creation
|
||||
# change later for only tags
|
||||
on: [push]
|
||||
jobs:
|
||||
Container-Build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get the code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: |
|
||||
src
|
||||
|
||||
- name: Build & push image ${{ gitea.ref }}
|
||||
uses: bymarshall/kaniko-action@main
|
||||
with:
|
||||
image: ha-addon-energa-meter
|
||||
tag: ${{ gitea.ref }}
|
||||
registry: pipebreaker.pl:5000
|
||||
file: Containerfile
|
||||
context: src/
|
||||
debug_mode: true
|
||||
22
.gitea/workflows/demo.yaml.disabled
Normal file
22
.gitea/workflows/demo.yaml.disabled
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Gitea Actions Demo
|
||||
run-name: ${{ gitea.actor }} is testing out GA 🍆
|
||||
on: [push]
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||
- name: List files
|
||||
run: |
|
||||
echo ${{ gitea.workspace }}:
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ gitea.status }}."
|
||||
|
||||
|
||||
|
||||
23
src/Containerfile
Normal file
23
src/Containerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM fedora-minimal:latest
|
||||
|
||||
RUN microdnf install -y python3-pip && pip install uv
|
||||
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
|
||||
RUN uv venv /app/venv && \
|
||||
source /app/venv/bin/activate && \
|
||||
uv pip install -r requirements.txt
|
||||
|
||||
# Copy data for add-on
|
||||
COPY database_empty.sqlite data/database.sqlite
|
||||
COPY rund.sh .
|
||||
COPY run.py .
|
||||
COPY main.py .
|
||||
COPY api.py .
|
||||
COPY moj_licznik.py .
|
||||
COPY log_config.py .
|
||||
RUN chmod a+x rund.sh
|
||||
|
||||
|
||||
CMD [ "/app/rund.sh" ]
|
||||
Reference in New Issue
Block a user