From 8fc4eca1b6057cbae5042cf98d65387293beb29f Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Mon, 30 Nov 2026 14:56:58 -0500 Subject: [PATCH] Part nasa/cFS#1205, fixes for snapshot workflow --- .github/workflows/snapshot-module-reusable.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/snapshot-module-reusable.yml b/.github/workflows/snapshot-module-reusable.yml index 7a747de4a..31eb3ec5f 100644 --- a/.github/workflows/snapshot-module-reusable.yml +++ b/.github/workflows/snapshot-module-reusable.yml @@ -185,7 +185,20 @@ jobs: PR_LABEL_IN: ${{ inputs.pr-label }} GH_REPO: ${{ github.repository }} GH_ACTOR: ${{ github.actor }} + VERSION_NUMBERS: ${{ inputs.version-numbers }} run: | + cat << EOF > ${RUNNER_TEMP}/pull-req-msg.txt + IC: $(date +%Y-%m-%d) development snapshot + + Automatically generated code snapshot + - development branch: ${DEV_BRANCH} + - target branch: ${BASE_BRANCH} + EOF + if [ -n "${VERSION_NUMBERS}" ] + then + echo "Includes version number update:" >> ${RUNNER_TEMP}/pull-req-msg.txt + echo "${VERSION_NUMBERS}" | jq . | grep '^ ' >> ${RUNNER_TEMP}/pull-req-msg.txt + fi if [ -z "${PR_LABEL_IN}" ] then LABEL_OPTS="" @@ -195,5 +208,5 @@ jobs: if [ -e ${RUNNER_TEMP}/pull-request.json ]; then echo "Pull request already exists: ${{ github.server_url }}/${GH_REPO}/pull/$(jq '.[0].number' ${RUNNER_TEMP}/pull-request.json)" else - gh pr create -R "${GH_REPO}" -a "${GH_ACTOR}" -B "${BASE_BRANCH}" -H "${IC_BRANCH}" --title "${DATE_TAG} development snapshot" ${LABEL_OPTS} -F "${RUNNER_TEMP}/commit-msg.txt" + gh pr create -R "${GH_REPO}" -a "${GH_ACTOR}" -B "${BASE_BRANCH}" -H "${IC_BRANCH}" --title "${DATE_TAG} development snapshot" ${LABEL_OPTS} -F "${RUNNER_TEMP}/pull-req-msg.txt" fi