log the inputs
This commit is contained in:
parent
60ab241ff1
commit
8861da1e1d
2 changed files with 31 additions and 8 deletions
|
|
@ -51,12 +51,36 @@ on:
|
||||||
description: 'Publier une release avec suffixe (ex. 1.0.0-rc1) malgré le fail-fast par défaut.'
|
description: 'Publier une release avec suffixe (ex. 1.0.0-rc1) malgré le fail-fast par défaut.'
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: true
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: 'Tag pazof/yavsc à packager (requis en dispatch, ex. 1.0.6 ou 1.0.7-rc1).'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
force_unstable:
|
||||||
|
description: 'Publier une release avec suffixe (ex. 1.0.0-rc1) malgré le fail-fast par défaut.'
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
env:
|
||||||
|
FORCE_UNSTABLE: ${{ inputs.force_unstable || 'false' }}
|
||||||
|
TAG: ${{ forgejo.event_name == 'push' && forgejo.ref_name || inputs.tag }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
log_inputs:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: docker.io/pazof/yavsc-build-env:debian12-dotnet10-android36-v2
|
||||||
|
steps:
|
||||||
|
- name: Log inputs
|
||||||
|
run: |
|
||||||
|
echo "TAG=$TAG"
|
||||||
|
echo "FORCE_UNSTABLE=$FORCE_UNSTABLE"
|
||||||
# Job unique : validation tag/CHANGELOG + build amd64 + build
|
# Job unique : validation tag/CHANGELOG + build amd64 + build
|
||||||
# arm64 + publication via l'API REST Forgejo (pas d'actions
|
# arm64 + publication via l'API REST Forgejo (pas d'actions
|
||||||
# tierces Node).
|
# tierces Node).
|
||||||
|
|
@ -65,7 +89,7 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: docker.io/pazof/yavsc-build-env:debian12-dotnet10-android36-v2
|
image: docker.io/pazof/yavsc-build-env:debian12-dotnet10-android36-v2
|
||||||
env:
|
env:
|
||||||
STATE_FILE: /tmp/release-state.json
|
STATE_FILE: /tmp/release-state
|
||||||
steps:
|
steps:
|
||||||
- name: Installer les pré-requis de build (debhelper + icônes)
|
- name: Installer les pré-requis de build (debhelper + icônes)
|
||||||
# L'image runner fournit déjà dotnet-sdk-10.0, git, jq,
|
# L'image runner fournit déjà dotnet-sdk-10.0, git, jq,
|
||||||
|
|
@ -98,13 +122,12 @@ jobs:
|
||||||
: > "$STATE_FILE"
|
: > "$STATE_FILE"
|
||||||
|
|
||||||
- name: Clone du repo au tag demandé
|
- name: Clone du repo au tag demandé
|
||||||
env:
|
|
||||||
TAG: ${{ forgejo.event_name == 'push' && forgejo.ref_name || inputs.tag }}
|
|
||||||
run: |
|
run: |
|
||||||
if [[ -z "$TAG" ]]; then
|
if [[ -z "$TAG" ]]; then
|
||||||
echo "::error::No tag provided. In workflow_dispatch, set the 'tag' input."
|
echo "::error::No tag provided. In workflow_dispatch, set the 'tag' input."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo "→ Cloning repo at tag $TAG"
|
||||||
|
|
||||||
cd /src
|
cd /src
|
||||||
if [[ ! -d _src/.git ]]; then
|
if [[ ! -d _src/.git ]]; then
|
||||||
|
|
@ -122,11 +145,11 @@ jobs:
|
||||||
|
|
||||||
# Persist TAG in the state file. --arg ensures proper
|
# Persist TAG in the state file. --arg ensures proper
|
||||||
# JSON escaping of any special chars.
|
# JSON escaping of any special chars.
|
||||||
jq -n --arg tag "$TAG" '{tag: $tag}' > "$STATE_FILE"
|
echo "$TAG" > "tag.txt"
|
||||||
|
|
||||||
- name: Valider le tag et la section CHANGELOG
|
- name: Valider le tag et la section CHANGELOG
|
||||||
run: |
|
run: |
|
||||||
TAG=$(jq -r '.tag' "$STATE_FILE")
|
TAG=$(cat "tag.txt")
|
||||||
cd /src/_src
|
cd /src/_src
|
||||||
echo "Validating tag $TAG"
|
echo "Validating tag $TAG"
|
||||||
|
|
||||||
|
|
|
||||||
4
Makefile
4
Makefile
|
|
@ -22,9 +22,9 @@
|
||||||
# POSTIT_OUT_DIR default: $(CURDIR)/.. (artifacts land here)
|
# POSTIT_OUT_DIR default: $(CURDIR)/.. (artifacts land here)
|
||||||
|
|
||||||
POSTIT_GIT_URL ?= https://github.com/pazof/yavsc.git
|
POSTIT_GIT_URL ?= https://github.com/pazof/yavsc.git
|
||||||
POSTIT_GIT_TAG ?= 1.0.6
|
POSTIT_GIT_TAG ?= 1.0.8-rc15
|
||||||
POSTIT_RUNTIME ?= linux-x64
|
POSTIT_RUNTIME ?= linux-x64
|
||||||
POSTIT_OUT_DIR ?= $(CURDIR)/..
|
POSTIT_OUT_DIR ?= $(CURDIR)/build
|
||||||
|
|
||||||
.PHONY: deb clean source test
|
.PHONY: deb clean source test
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue