omaroughriss a67464fd65
All checks were successful
Build and Push to Registry / build-and-push (push) Successful in 34s
Minor fix
2025-07-23 12:46:04 +02:00

41 lines
1.0 KiB
YAML

name: Build and Push to Registry
on:
push:
branches: [ main ]
pull_request:
types: [closed]
branches: [ main ]
env:
REGISTRY: git.4nkweb.com
IMAGE_NAME: 4nk/lecoffre-back-mini
jobs:
build-and-push:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true || github.event_name == 'push'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.USER }}
password: ${{ secrets.TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
ENV_VARS=${{ secrets.ENV_VARS }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ gitea.sha }}