Skip to content

Merge branch 'main' into 2.0 #5

Merge branch 'main' into 2.0

Merge branch 'main' into 2.0 #5

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
name: Livepatch specs check
on:
push:
branches: [2.0, fasttrack/*]
pull_request:
branches: [2.0, fasttrack/*]
jobs:
spec-check:
name: Livepatches check
runs-on: ubuntu-latest
steps:
# Checkout the branch of our repo that triggered this action
- name: Workflow trigger checkout
uses: actions/checkout@v4
- name: Setup Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Get Python dependencies
run: |
sudo apt-get install -y python3-rpm
sudo python3 -m pip install -r toolkit/scripts/requirements.txt
- name: Check livepatch specs are valid
run: |
export [email protected]
export USER_NAME=test
.github/workflows/overwrite_shell_link.sh
if ! toolkit/scripts/livepatching/update_livepatches.sh >/dev/null
then
echo "ERROR: failed to verify livepatch specs." >&2
exit 1
fi
if [[ -z "$(git diff)" ]]
then
exit 0
fi
cat << EOF
#################### CHECK FAILURE ####################
Livepatch specs need to be updated!
Run the following command to perform the update:
toolkit/scripts/livepatching/update_livepatches.sh
#################### CHECK FAILURE ####################
EOF
exit 1