Compare commits

...

18 Commits

Author SHA1 Message Date
a6d42086a7 change secret name
All checks were successful
Semantic Release and Changelog / Patch (push) Successful in 6s
Semantic Release and Changelog / Build and Publish (push) Successful in 42s
2024-02-04 09:27:07 +00:00
35c97c45d6 Merge pull request 'erichardson-patch-1' (#42) from erichardson-patch-1 into master
Some checks failed
Semantic Release and Changelog / Patch (push) Successful in 6s
Semantic Release and Changelog / Build and Publish (push) Failing after 39s
Reviewed-on: #42
2024-02-04 09:21:47 +00:00
ff6c893b84 erichardson-patch-1 (#41)
Some checks failed
Semantic Release and Changelog / Patch (push) Successful in 7s
Semantic Release and Changelog / Build and Publish (push) Failing after 43s
Reviewed-on: #41
2024-02-04 09:20:03 +00:00
30ab208c1b build on everything but master, also change non master build name to dev
All checks were successful
Build and publish Image / build-and-push (push) Successful in 42s
2024-02-04 09:19:28 +00:00
ac744a76e3 publish new tagged image on push to master
All checks were successful
Build and publish Image / build-and-push (push) Successful in 46s
2024-02-04 09:16:57 +00:00
582260f918 Test auto-versioning
All checks were successful
Build and publish Image / build-and-push (push) Successful in 46s
Semantic Release and Changelog / Patch (push) Successful in 18s
2024-02-04 08:49:20 +00:00
bebb06254c upgrade apk packages
All checks were successful
Build and publish Image / build-and-push (push) Successful in 1m2s
2024-02-04 07:52:17 +00:00
a151cab3a8 add docker install
All checks were successful
Build and publish Image / build-and-push (push) Successful in 1m9s
2024-02-04 07:33:59 +00:00
3f98fc33d4 change runner to ubuntu
Some checks failed
Build and publish Image / build-and-push (push) Failing after 3s
2024-02-04 06:08:23 +00:00
1bf75e3791 fix runner name
Some checks failed
Build and publish Image / build-and-push (push) Failing after 2s
2024-02-04 06:03:36 +00:00
d6f4ac9a12 add publish workflow
Some checks are pending
Build and publish Image / build-and-push (push) Waiting to run
2024-02-04 06:03:04 +00:00
423b291203 test
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2s
2024-02-04 02:34:25 +00:00
642ea750bb change label to shared
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
2024-02-04 02:31:35 +00:00
31f7d5aaaa add demo workflow to test actions
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
2024-02-04 02:28:26 +00:00
90cf8c55cf Update fimport.py 2023-12-22 07:35:14 +00:00
48f508dee3 Update fimport.py for importlib module syntax 2023-12-22 07:28:30 +00:00
499c6d50da Merge branch 'fix-imp' into 'master'
Update fimport.py

See merge request erichardson/py-eagle-mqtt!36
2023-12-22 07:23:16 +00:00
49e3d56b1c Update fimport.py 2023-12-22 07:21:41 +00:00
4 changed files with 95 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
name: Build and publish Image
run-name: ${{ gitea.actor }} is building py-eagle-mqtt image
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!master' # excludes master
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Docker
run: curl -fsSL https://get.docker.com | sh
- name: Build Docker image
run: docker build -t harbor.evanshome.io/library/py-eagle-mqtt:dev ./Docker/
- name: Login to Harbor
run: docker login -u ${{ secrets.HARBOR_USERNAME }} -p ${{ secrets.HARBOR_PASSWORD }} harbor.evanshome.io
- name: Push Docker image to Harbor
run: docker push harbor.evanshome.io/library/py-eagle-mqtt:dev

View File

@@ -0,0 +1,61 @@
name: Semantic Release and Changelog
run-name: ${{ gitea.actor }} is running Semantic Release
on:
push:
branches:
- 'master'
jobs:
Patch:
name: Patch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Minor version for each merge
id: taggerDryRun
uses: anothrNick/github-tag-action@1.67.0
env:
GITHUB_TOKEN: ${{ secrets.REPO_PUSH_TOKEN }}
WITH_V: true
DRY_RUN: true
- name: echo new tag
run: |
echo "The next tag version will be: ${{ steps.taggerDryRun.outputs.new_tag }}"
- name: echo tag
run: |
echo "The current tag is: ${{ steps.taggerDryRun.outputs.tag }}"
- name: echo part
run: |
echo "The version increment was: ${{ steps.taggerDryRun.outputs.part }}"
Build-and-Publish:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Docker
run: curl -fsSL https://get.docker.com | sh
- name: Build Docker image
run: docker build -t harbor.evanshome.io/library/py-eagle-mqtt:latest ./Docker/
- name: Minor version for each merge
id: taggerFinal
uses: anothrNick/github-tag-action@1.67.0
env:
GITHUB_TOKEN: ${{ secrets.REPO_PUSH_TOKEN }}
WITH_V: true
- name: tag with name
run: docker tag harbor.evanshome.io/library/py-eagle-mqtt:latest harbor.evanshome.io/library/py-eagle-mqtt:${{ steps.taggerFinal.outputs.new_tag }}
- name: Login to Harbor
run: docker login -u ${{ secrets.HARBOR_USERNAME }} -p ${{ secrets.HARBOR_PASSWORD }} harbor.evanshome.io
- name: Push Docker image to Harbor
run: docker push --all-tags harbor.evanshome.io/library/py-eagle-mqtt

View File

@@ -18,6 +18,7 @@ COPY requirements.txt /app
COPY ./src/conf/logrotate/tHome /etc/logrotate.d/ COPY ./src/conf/logrotate/tHome /etc/logrotate.d/
ENV PYTHONPATH=/app/src/python ENV PYTHONPATH=/app/src/python
RUN apk --update add --no-cache logrotate \ RUN apk --update add --no-cache logrotate \
&& apk upgrade \
&& pip3 install --no-cache-dir --upgrade pip \ && pip3 install --no-cache-dir --upgrade pip \
&& pip3 install --no-cache-dir -r requirements.txt && pip3 install --no-cache-dir -r requirements.txt
COPY . /app COPY . /app

View File

@@ -3,8 +3,9 @@
# Arbitrary file importing utility. Does NOT modify sys.modules # Arbitrary file importing utility. Does NOT modify sys.modules
# #
#=========================================================================== #===========================================================================
import imp #import importlib
import os import os
import types
def fimport( filePath ): def fimport( filePath ):
# Read the file and compile the code. This will fail if the file # Read the file and compile the code. This will fail if the file
@@ -19,7 +20,7 @@ def fimport( filePath ):
rootName, ext = os.path.splitext( fileName ) rootName, ext = os.path.splitext( fileName )
# Create a new module and exec the code in it's context. # Create a new module and exec the code in it's context.
m = imp.new_module( rootName ) m = types.ModuleType( rootName )
m.__file__ = absPath m.__file__ = absPath
exec(code, m.__dict__) exec(code, m.__dict__)