Add new workflow for building Docker image #1

Merged
julienfastre merged 1 commits from setup-gitea-actions into main 2024-09-04 13:45:30 +00:00
Showing only changes of commit c1a7957b64 - Show all commits

View File

@ -0,0 +1,36 @@
name: Build image and push it to registry
on:
push:
branches:
- main
schedule:
- cron: '5 4 * * *'
jobs:
# Build job
build:
runs-on: cth-ubuntu-latest
steps:
- name: Check out repository
uses: https://github.com/actions/checkout@v4
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Login to registry
uses: https://github.com/docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: 'h3m6q87t.gra7.container-registry.ovh.net'
- name: Build and push
uses: https://github.com/docker/build-push-action@v5
with:
context: ./pythonProject
file: ./pythonProject/Dockerfile
push: true
tags: 'h3m6q87t.gra7.container-registry.ovh.net/sign-pdf-worker/worker:latest'