Files
Recruitment-HC/.gitea/workflows/build-image.yaml
T
NikoKS 6a8e7fcbcb
Build and publish Docker image / build (push) Successful in 10s
ignoreignore some build
2026-10-16 11:48:00 +07:00

46 lines
1.2 KiB
YAML

# Explicit URLs and commit pins keep action sources predictable on Gitea.
# yamllint disable rule:line-length
name: Build and publish Docker image
'on':
push:
branches: [main]
paths-ignore:
- 'docs/**'
- '**/*.md'
- 'dev/**'
- 'DB/**'
workflow_dispatch:
concurrency:
group: ${{ gitea.workflow }}-${{ gitea.ref }}
cancel-in-progress: true
env:
IMAGE: gitea.cptckp.com/nurinda/recruitment-hc
jobs:
build:
if: gitea.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: Checkout
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- name: Log in to Gitea Container Registry
uses: https://github.com/docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: gitea.cptckp.com
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and publish latest
shell: bash
run: |
set -euo pipefail
docker build --tag "$IMAGE:latest" .
docker push "$IMAGE:latest"