Files
Django_kube/.gitea/workflows/dockerfile_runner.yaml
pierre geeraert 3315fbdb4f
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5m27s
change the DB settings and change the policy to restart after build
2025-06-22 19:24:22 +01:00

59 lines
1.9 KiB
YAML

name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on:
push:
issue_comment:
types: [created]
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: Cache pip
uses: actions/cache@v3
with:
path: /root/.cache/pip
key: pip
restore-keys: pip
- name: inject cache into docker
uses: reproducible-containers/buildkit-cache-dance@v3.1.0
with:
cache-source: /root/.cache/pip
- 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
#build-contexts: pip_cache=${{steps.vars.outputs.pip-dir}}
tags: gitea.tryton.geeraert.eu/pi-ux-ce/django-python:latest
cache-from: type=registry,ref=gitea.tryton.geeraert.eu/pi-ux-ce/django-python:buildcache
cache-to: type=registry,ref=gitea.tryton.geeraert.eu/pi-ux-ce/django-python:buildcache,mode=max
- name: drop the pod to force pulling the new image
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: rollout restart deployment django -n django
- run: echo "🍏 This job's status is ${{ job.status }}."