39 lines
908 B
YAML
39 lines
908 B
YAML
name: Docker server image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- "v*"
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Gitea container registry
|
|
if: github.event_name != 'pull_request'
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: gitea.auvem.com
|
|
username: ${{ vars.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: Dockerfile.server
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: |
|
|
gitea.auvem.com/end/officeconvert-server:${{ github.sha }}
|
|
gitea.auvem.com/end/officeconvert-server:latest
|