All checks were successful
Build and Push Docker Image / build (push) Successful in 25s
36 lines
927 B
YAML
36 lines
927 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Set image tag
|
|
id: tag
|
|
run: echo "name=${{ vars.REGISTRY_URL }}/$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')/santeh-ray:latest" >> $GITHUB_OUTPUT
|
|
|
|
- name: Login to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ vars.REGISTRY_URL }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Build and Push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: ${{ github.event_name == 'push' }}
|
|
tags: ${{ steps.tag.outputs.name }} |