Compare commits

...
14 Commits
Author SHA1 Message Date
pi-ux-ce a0604758bf add caching
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s
2025-06-03 10:59:57 +00:00
pi-ux-ce 2767a71e5c upgrade pip before running the pip install command
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s
2025-02-17 14:06:21 +00:00
pi-ux-ce 01c3cd9d8e add more print
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 31s
2025-02-17 12:44:15 +00:00
pierre geeraert 82e33f502a try to add a try catch to validate the complete run
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 15s
2025-02-16 22:47:39 +00:00
pi-ux-ce 23da31d247 try to block the never ending creation of pod while failing
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 10s
2025-02-09 12:03:37 +00:00
pi-ux-ce 99a9fb63a6 enable backoff limit
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 11s
2024-11-11 17:15:01 +00:00
pi-ux-ce cae1fab1f6 rename Dockerfile to dockerfile
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9m47s
2024-11-11 10:06:55 +00:00
pi-ux-ce a4376d499f Merge branch 'main' of https://gitea.tryton.geeraert.eu/pi-ux-ce/dyndns_python
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 19s
2024-11-11 10:05:13 +00:00
pi-ux-ce bfd91178e1 commit just to trigger actiosn 2024-11-11 10:04:58 +00:00
pi-ux-ce 73f92406c6 change the image tag to latest
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s
2024-11-04 09:16:03 +00:00
pi-ux-ce 144d36dfad change the registry path
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s
2024-11-04 09:14:40 +00:00
pi-ux-ce 00870b29fa ✨ 📝 add README and therefore test new repo
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 34s
2024-10-31 13:12:57 +00:00
pi-ux-ce 909dfbab56 separate the runners 2024-10-30 11:20:22 +00:00
pi-ux-ce 2d2a2c29d5 add build image process 2024-10-23 15:19:48 +01:00
6 changed files with 172 additions and 15 deletions
+42
View File
@@ -0,0 +1,42 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on:
push:
branches:
- "*"
paths:
- 'dockerfile'
tags-ignore:
- '*'
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to gitea
uses: docker/login-action@v3
with:
registry: gitea.tryton.geeraert.eu
username: ${{ secrets.USERNAME_GITEA }}
password: ${{ secrets.PASSWORD_GITEA }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: gitea.tryton.geeraert.eu/pi-ux-ce/dyndns_python:latest
cache-from: type=registry,ref=gitea.tryton.geeraert.eu/pi-ux-ce/dyndns_python:buildcache
cache-to: type=registry,ref=gitea.tryton.geeraert.eu/pi-ux-ce/dyndns_python:buildcache,mode=max
- run: echo "🍏 This job's status is ${{ job.status }}."
+23
View File
@@ -0,0 +1,23 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- name: Perform kubectl tasks
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: apply -f .
- run: echo "🍏 This job's status is ${{ job.status }}."
+4 -14
View File
@@ -5,16 +5,6 @@ metadata:
---
apiVersion: batch/v1
kind: CronJob
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchFields:
- key: metadata.name
operator: In
values:
- kube-master
metadata:
name: dyndns-pythonrenew
namespace: dyndns-python
@@ -23,12 +13,12 @@ spec:
jobTemplate:
spec:
ttlSecondsAfterFinished: 100
backoffLimit: 4
template:
spec:
# nodeName: kube-master
containers:
- name: dyndns-python
# image: dyndns_python:latest
image: localhost:31795/dyndns_python
restartPolicy: Never
image: gitea.tryton.geeraert.eu/pi-ux-ce/dyndns_python:latest
imagePullPolicy: IfNotPresent
restartPolicy: OnFailure
+93
View File
@@ -0,0 +1,93 @@
# dyndns_python_kube
## Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
## Add your files
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
```
cd existing_repo
git remote add origin https://gitlab.tryton.geeraert.eu/pierre/nextcloud_kube.git
git branch -M main
git push -uf origin main
```
## Integrate with your tools
- [ ] [Set up project integrations](https://gitlab.tryton.geeraert.eu/pierre/nextcloud_kube/-/settings/integrations)
## Collaborate with your team
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
+7
View File
@@ -30,15 +30,22 @@ def update_zone(subdomain,new_ip,domain_id):
result = client.put('/domain/zone/'+new_domain+'/dynHost/record/'+domain_id,
ip=new_ip,
subDomain=subdomain)
print("Zone updated")
refresh_dns()
return result
def refresh_dns():
result_refresh = client.post('/domain/zone/'+new_domain+'/refresh')
print("DNS refreshed")
return result_refresh
def MyIP():
response = requests.get('https://ifconfig.me/ip')
print("Current IP: "+response.text)
return response.text
try:
result_update = update_zone(new_subdomain,MyIP(),str(Domain_id()[0]))
except:
raise
+2
View File
@@ -1,8 +1,10 @@
FROM python:3
MAINTAINER pi-ux-ce
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
COPY . .