Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/snapshot-module-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand All @@ -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