Automate builds
All checks were successful
BuildMain / BuildLatest (push) Successful in 3m10s
BuildTag / BuildNightly (push) Successful in 4m24s

This commit is contained in:
Guillaume Lapierre 2024-11-05 09:11:34 +01:00
parent 55a395474f
commit 48e0b078af
2 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,34 @@
#
# Build docker image
#
name: BuildMain
run-name: ${{ gitea.actor }} running CI in the pipeline 🚀
on: [ push ]
jobs:
BuildLatest:
runs-on: cth-ubuntu-latest
if: gitea.ref == 'refs/heads/main'
env:
RUNNER_TOOL_CACHE: /toolcache
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up docker buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
network=giteanet
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push latest
uses: docker/build-push-action@v5
env:
ACTIONS_RUNTIME_TOKEN: ''
with:
push: true
tags: zeguigui/roundcubemail:latest-apache

View File

@ -0,0 +1,35 @@
#
# Build docker image
#
name: BuildTag
run-name: ${{ gitea.actor }} running CI in the pipeline 🚀
on:
schedule:
- cron: "30 2 * * *"
jobs:
BuildNightly:
env:
RUNNER_TOOL_CACHE: /toolcache
runs-on: cth-ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up docker buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
network=giteanet
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push version
uses: docker/build-push-action@v5
env:
ACTIONS_RUNTIME_TOKEN: ''
with:
push: true
tags: zeguigui/roundcubemail:latest-apache