---
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: https://code.thetadev.de/ThetaDev/action-kaniko@v1
      with:
        image: ha-addon-energa-meter:${{ gitea.ref }}
        registry: pipebreaker.pl:5000
        build_file: Containerfile
        path: src/
        debug: true
