From f0910f874e2b5cd15886fc0e9b97432dd9e0d5f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonah=20Br=C3=BCchert?= Date: Fri, 16 Feb 2024 23:36:47 +0100 Subject: [PATCH] hi --- .github/workflows/test-import.yml | 2 +- ci/fetch-feeds.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-import.yml b/.github/workflows/test-import.yml index fb4b0c9e..074c959f 100644 --- a/.github/workflows/test-import.yml +++ b/.github/workflows/test-import.yml @@ -12,7 +12,7 @@ jobs: - name: Check out code uses: actions/checkout@v4 - name: Fetch branches and submodules - run: git fetch --unshallow && git submodule update --init --checkout --remote && git checkout -b pr + run: git fetch --unshallow && git fetch --all && git submodule update --init --checkout --remote - name: Build docker images run: docker build -t transitous . -f ci/container/Containerfile - name: Verify that new feeds can be downloaded diff --git a/ci/fetch-feeds.py b/ci/fetch-feeds.py index 1686b9db..e82b45e7 100755 --- a/ci/fetch-feeds.py +++ b/ci/fetch-feeds.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: AGPL-3.0-or-later import sys +import os from pathlib import Path import subprocess @@ -20,9 +21,15 @@ for feed in feed_dir.glob("*.json"): subprocess.check_call(["./src/fetch.py", str(feed.absolute())]) case "merge-request": + # Silence warnings about different ownerships inside and outside of the + # container on actions + subprocess.check_call( + ["git", "config", "--global", + "--add", "safe.directory", os.getcwd()]) + # Find all files that were changed in the latest commit changed_files = subprocess.check_output( - ["git", "diff", "--name-only", "HEAD~1", "HEAD"]) \ + ["git", "diff", "--name-only", "origin/main", "HEAD"]) \ .decode().splitlines() changed_feeds = [f for f in changed_files if