12 Commits

Author SHA1 Message Date
95e856f5f7 try another kaniko builder
Some checks failed
Build and push container / Container-Build (push) Failing after 2m12s
2024-07-28 14:26:07 +02:00
99f0c12455 disabled demo action 2024-07-28 14:25:57 +02:00
6b2ad223c7 separate tag
Some checks failed
Build and push container / Container-Build (push) Failing after 46s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 38s
2024-07-27 16:04:11 +02:00
0330fddaf1 just ref
Some checks failed
Build and push container / Container-Build (push) Failing after 52s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 51s
2024-07-27 16:00:59 +02:00
399cce6a2e push only
Some checks failed
Build and push container / Container-Build (push) Failing after 2m5s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 39s
2024-07-27 15:56:19 +02:00
94be339a0a indents from hell
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 50s
2024-07-27 15:53:17 +02:00
5069cfa039 fixes
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
2024-07-27 15:52:43 +02:00
7ef9c4e614 ga: autobulding containers
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 40s
2024-07-27 15:48:39 +02:00
17e8a90f40 typo fix
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 47s
2024-07-27 15:29:36 +02:00
edcde52192 move GA to proper place
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4m55s
2024-07-27 15:23:12 +02:00
15d2634186 demo GA 2024-07-27 15:20:57 +02:00
09da459a53 add Containerfile for pbrk deployments 2024-07-27 15:15:35 +02:00
3 changed files with 69 additions and 0 deletions

View 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

View 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
View 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" ]