From 2bc0ba780f4d8bc0ad3cfb0c650f148f251c9e2a Mon Sep 17 00:00:00 2001 From: CoreOS Bot Date: Thu, 24 Feb 2022 01:17:49 +0000 Subject: [PATCH] tree: import changes from testing-devel at 0a84651cb79e79c4ea0a846eb32865c430ac2011 --- .github/workflows/promotion-diff.yml | 44 +++++++++++++++++++ .../35coreos-live/coreos-livepxe-rootfs.sh | 4 +- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/promotion-diff.yml diff --git a/.github/workflows/promotion-diff.yml b/.github/workflows/promotion-diff.yml new file mode 100644 index 00000000..b8f0cb7c --- /dev/null +++ b/.github/workflows/promotion-diff.yml @@ -0,0 +1,44 @@ +--- +name: Check promotion diffs +on: + pull_request: + branches: [next, testing, stable] +permissions: + contents: read + +jobs: + promotion-diff: + name: Check promotion diffs + runs-on: ubuntu-latest + # Only run if this looks like a promotion PR + if: "startsWith(github.event.pull_request.title, 'tree: promote changes from')" + steps: + - name: Get base commit hash + env: + COMMIT_TITLE: ${{ github.event.pull_request.title }} + run: | + echo "ORIGIN_COMMIT=$(echo ${COMMIT_TITLE} | awk '{print $NF}')" >> $GITHUB_ENV + - name: Check out origin commit + uses: actions/checkout@v2 + with: + path: origin + ref: ${{ env.ORIGIN_COMMIT }} + - name: Check out base branch + uses: actions/checkout@v2 + with: + path: base + ref: ${{ github.base_ref }} + - name: Check out PR + uses: actions/checkout@v2 + with: + path: new + - name: Ignore manifest files + run: | + # manifest.yaml is per-branch, so we care about changes vs. the + # one in the base, not the one from the origin + cp base/manifest.yaml origin/ + - name: Compare trees + uses: coreos/check-diff@main + with: + basedir: origin + patchdir: new diff --git a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-live/coreos-livepxe-rootfs.sh b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-live/coreos-livepxe-rootfs.sh index 9f59a8db..c7188bfb 100755 --- a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-live/coreos-livepxe-rootfs.sh +++ b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-live/coreos-livepxe-rootfs.sh @@ -23,12 +23,12 @@ elif [[ -n "${rootfs_url}" ]]; then # rootfs URL was provided as karg. Fetch image, check its hash, and # unpack it. echo "Fetching rootfs image from ${rootfs_url}..." - if [[ ${rootfs_url} != http:* && ${rootfs_url} != https:* ]]; then + if [[ ${rootfs_url} != http:* && ${rootfs_url} != https:* && ${rootfs_url} != tftp:* ]]; then # Don't commit to supporting protocols we might not want to expose in # the long term. echo "Unsupported scheme for image specified by:" >&2 echo "coreos.live.rootfs_url=${rootfs_url}" >&2 - echo "Only HTTP and HTTPS are supported. Please fix your PXE configuration." >&2 + echo "Only HTTP, HTTPS, and TFTP are supported. Please fix your PXE configuration." >&2 exit 1 fi