Skip to content

Roll out stable 41.20241027.3.0, testing 41.20241109.2.0, next 41.20241109.1.0 #169

Roll out stable 41.20241027.3.0, testing 41.20241109.2.0, next 41.20241109.1.0

Roll out stable 41.20241027.3.0, testing 41.20241109.2.0, next 41.20241109.1.0 #169

Workflow file for this run

---
name: Check stream diffs
on:
pull_request:
branches: [main]
paths: ["streams/*.json"]
permissions:
contents: read
jobs:
stream-diff:
name: Check stream diffs
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Genericize metadata
run: |
# Cache data from PR head
mkdir head
cp -r streams ci/genericize-stream.py head
# Switch to base
git checkout "${GITHUB_BASE_REF}"
# Get the `git describe` from fedora-coreos-stream-generator
git clone https://github.com/coreos/fedora-coreos-stream-generator
# matches https://github.com/coreos/fedora-coreos-stream-generator/blob/8ef5cb154645641a124c44105cbd482a9bbc115a/Makefile#L1
generator_tag=$(git -C fedora-coreos-stream-generator describe --dirty --always)
rm -rf fedora-coreos-stream-generator
echo "Current fedora-coreos-stream-generator: ${generator_tag}"
# Genericize metadata
mkdir -p {old,new}/streams
for stream in streams/*.json; do
if cmp -s "${stream}" "head/${stream}"; then
# Base and head identical; ignore stream to avoid false
# positives if the generator field is stale
echo "${stream} unchanged, skipping"
continue
fi
echo "${stream}, old"
# Pretend the old metadata used the latest tag of
# fedora-coreos-stream-generator.
head/genericize-stream.py -g "${generator_tag}" "${stream}" > "old/${stream}"
echo "${stream}, new"
head/genericize-stream.py "head/${stream}" > "new/${stream}"
done
- name: Compare genericized metadata
uses: coreos/actions-lib/check-diff@main
with:
basedir: old
patchdir: new