Auto-update at Wed Nov 6 03:05:41 UTC 2024 #2869
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Retouch Release Notes | |
on: | |
push: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
tags: | |
description: 'Test scenario tags' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Check out the release notes | |
env: | |
SECRET_SSH_KEY: ${{ secrets.VPP_RELNOTES_PRIVATE_SSH_KEY }} | |
run: | | |
git clone https://github.com/FDio/vpp | |
git clone https://github.com/ayourtch/vpp-relops | |
echo "$SECRET_SSH_KEY" >secret_ssh_key | |
chmod 600 secret_ssh_key | |
ssh-agent bash -c 'ssh-add secret_ssh_key; git clone [email protected]:vpp-dev/vpp-release-notes.git' | |
- name: Retouch the release notes | |
run: | | |
cd vpp | |
VERSION=$(git describe --long HEAD | sed -e 's/-[^-]\+-[^-]\+$//g' -e 's/^\(v[0-9]\+.[0-9]\+\)-.*$/\1/') | |
cd .. | |
cd vpp-release-notes | |
SED_FILE="${VERSION}.sed" | |
if [ -e ${SED_FILE} ]; then | |
sed -f ${SED_FILE} RELEASE-GENERATED.md >RELEASE.md | |
else | |
cp RELEASE-GENERATED.md RELEASE.md | |
fi | |
cat HOW-IT-WORKS.md RELEASE.md > README.md | |
- name: Push the new release note | |
env: | |
SECRET_SSH_KEY: ${{ secrets.VPP_RELNOTES_PRIVATE_SSH_KEY }} | |
run: | | |
cd vpp-release-notes | |
DIFFS_LINES=$(git diff | wc -l) | |
if [ "$DIFFS_LINES" != "0" ]; then | |
git config user.email "[email protected]" | |
git config user.name "Andrew Yourtchenko (ghjobs)" | |
git add RELEASE.md || true | |
git add README.md || true | |
git commit -a -m "Retouch at $(date)" | |
ssh-agent bash -c 'ssh-add ../secret_ssh_key; git push origin master' | |
fi | |