gmao/.forgejo/workflows/release.yml

34 lines
862 B
YAML
Raw Permalink Normal View History

2026-08-14 18:02:25 +02:00
name: Validation de version GMAO
on:
push:
tags:
- 'gmao-v*'
jobs:
validate-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Verifier la correspondance du tag
shell: bash
run: |
version="$(tr -d '\r\n' < VERSION)"
expected="gmao-v${version}"
if [ "${GITHUB_REF_NAME}" != "${expected}" ]; then
echo "Le tag ${GITHUB_REF_NAME} ne correspond pas a VERSION (${expected})."
exit 1
fi
- name: Construire l'image versionnee
shell: bash
run: |
version="$(tr -d '\r\n' < VERSION)"
docker build \
--build-arg GMAO_VERSION="${version}" \
--build-arg GIT_VERSION="${GITHUB_SHA}" \
--tag "gmao-college:${version}" \
.