39 lines
848 B
YAML
39 lines
848 B
YAML
---
|
|
name: Test and publish
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
IMAGE: oci.reg.darano.ir/personal/tracking-personel
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://git.darano.ir/actions/checkout@v5
|
|
with:
|
|
token: ${{ gitea.token }}
|
|
path: ./
|
|
|
|
- name: Select package mirror
|
|
uses: ./.gitea/actions/setup-mirrors
|
|
|
|
- name: Log in to registry
|
|
if: gitea.event_name == 'push'
|
|
uses: ./.gitea/actions/docker-login
|
|
with:
|
|
password: ${{ secrets.REG_PASS }}
|
|
|
|
- name: Build and test image
|
|
uses: ./.gitea/actions/docker-build-push
|
|
with:
|
|
image: ${{ env.IMAGE }}
|
|
branch: main
|
|
commit_sha: ${{ gitea.sha }}
|
|
push: ${{ gitea.event_name == 'push' }}
|