.github: print date of today in the PR title

Let's add date of today in the PR title, to avoid confusion when
seeing the same title for multiple different weekly update PRs.
This commit is contained in:
Dongsu Park 2022-10-26 17:58:26 +02:00
parent 716d9c1ca6
commit 2f32d72231

View File

@ -62,17 +62,19 @@ jobs:
updated=1 updated=1
count=$(git -C portage-stable rev-list --count "${old_head}..${new_head}") count=$(git -C portage-stable rev-list --count "${old_head}..${new_head}")
fi fi
todaydate=$(date +%Y-%m-%d)
echo "UPDATED=${updated}" >>"${GITHUB_OUTPUT}" echo "UPDATED=${updated}" >>"${GITHUB_OUTPUT}"
echo "COUNT=${count}" >>"${GITHUB_OUTPUT}" echo "COUNT=${count}" >>"${GITHUB_OUTPUT}"
echo "TODAYDATE=${todaydate}" >>"${GITHUB_OUTPUT}"
- name: Create pull request for main branch - name: Create pull request for main branch
uses: peter-evans/create-pull-request@v4 uses: peter-evans/create-pull-request@v4
if: steps.update-listed-packages.outputs.UPDATED == 1 if: steps.update-listed-packages.outputs.UPDATED == 1
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
path: portage-stable path: portage-stable
branch: buildbot/automatic-package-updates branch: buildbot/weekly-package-updates-${{steps.update-listed-packages.outputs.TODAYDATE }}
delete-branch: true delete-branch: true
base: main base: main
title: Weekly package updates title: Weekly package updates ${{steps.update-listed-packages.outputs.TODAYDATE }}
body: Updated ${{steps.update-listed-packages.outputs.COUNT }} package(s). body: Updated ${{steps.update-listed-packages.outputs.COUNT }} package(s).
labels: main labels: main