Stock control supervisors. Create docker-image.yml #4
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
Romeo Rosete # 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/*] | ||
permissions: read-all | ||
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 |