Add new workflow for building Docker image
All checks were successful
Build image and push it to registry / build (push) Successful in 4m35s
All checks were successful
Build image and push it to registry / build (push) Successful in 4m35s
This commit introduces a new GitHub Actions workflow used to build and push Docker images upon every push. This workflow uses Docker Buildx and automatically logs into the specified registry with stored credentials.
This commit is contained in:
parent
22c5191f43
commit
d86329ed9a
31
.gitea/workflows/build-image.yaml
Normal file
31
.gitea/workflows/build-image.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
name: Build image and push it to registry
|
||||
|
||||
on:
|
||||
push
|
||||
|
||||
|
||||
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'
|
Loading…
Reference in New Issue
Block a user