-
Notifications
You must be signed in to change notification settings - Fork 856
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: fix packaging patch check (#5713)
Also: - simplify checkout logic to use local github main branch - add human-friendly job name and reduce redundant words
- Loading branch information
Showing
1 changed file
with
11 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Packaging Tests | ||
name: Packaging | ||
|
||
on: | ||
pull_request: | ||
|
@@ -18,13 +18,15 @@ env: | |
|
||
jobs: | ||
check-patches: | ||
name: Check patches | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Fetch all branches for merging | ||
fetch-depth: 0 | ||
ref: main | ||
- name: Prepare dependencies | ||
run: | | ||
sudo DEBIAN_FRONTEND=noninteractive apt-get update | ||
|
@@ -34,15 +36,18 @@ jobs: | |
echo 'QUILT_PATCHES=debian/patches' >> ~/.quiltrc | ||
echo 'QUILT_SERIES=debian/patches/series' >> ~/.quiltrc | ||
- name: 'Daily recipe: quilt patches apply successfully and tests run' | ||
- name: Configure git and merge | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git remote add upstream https://git.launchpad.net/cloud-init | ||
git fetch upstream main | ||
git checkout upstream/main | ||
git merge ${{ github.sha }} | ||
test -f debian/patches/series || echo "no patches, skipping" && exit 0 | ||
- name: Quilt patches apply successfully and tests run | ||
run: | | ||
if test -f debian/patches/series; then | ||
echo "no patches, skipping" | ||
exit 0 | ||
fi | ||
quilt push -a | ||
tox -e py3 | ||
quilt pop -a |