41 lines
939 B
YAML
41 lines
939 B
YAML
name: build-and-push-docker
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout codice
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Docker client on Alpine (if using container)
|
|
run: |
|
|
apk update
|
|
apk add --no-cache docker
|
|
shell: sh
|
|
|
|
- name: Login al registry Gitea
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: gitea.enrilinux.ovh
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Setup Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build e push immagine
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
gitea.enrilinux.ovh/enrilinux/webdlp:latest
|
|
gitea.enrilinux.ovh/enrilinux/webdlp:${{ github.sha }}
|
|
|