Skip to content

Commit

Permalink
ci: fix packaging patch check (#5713)
Browse files Browse the repository at this point in the history
Also:
- simplify checkout logic to use local github main branch
- add human-friendly job name and reduce redundant words
  • Loading branch information
holmanb committed Sep 18, 2024
1 parent c484720 commit 0a02141
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/packaging-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Packaging Tests
name: Packaging

on:
pull_request:
Expand All @@ -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
Expand All @@ -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

0 comments on commit 0a02141

Please sign in to comment.