generated from alphane/template
33 lines
842 B
YAML
33 lines
842 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ github.server_url }}
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
${{ github.server_url }}/${{ github.repository }}:latest
|
|
${{ github.server_url }}/${{ github.repository }}:${{ github.sha }}
|
|
build-args: |
|
|
RELEASE_TAG=${{ github.ref_name }}
|
|
GIT_COMMIT_HASH=${{ github.sha }}
|