Skip to content

Retouch at Thu Jul 20 03:07:09 UTC 2023 #1929

Retouch at Thu Jul 20 03:07:09 UTC 2023

Retouch at Thu Jul 20 03:07:09 UTC 2023 #1929

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