From 6b3eb9c270fe38b1d511a1362e02f872ccf8a08f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Tue, 27 Aug 2024 13:29:48 +0200 Subject: [PATCH] Remove the usage of shared artifacts from the checks workflow (#2673) --- .github/workflows/checks.yml | 30 ++++++------------------------ scripts/check/owner.py | 3 +-- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index d299969..b20a1b4 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -55,18 +55,6 @@ jobs: id: category run: echo "category=$(python3 -m scripts.changed.category)" >> $GITHUB_OUTPUT - - name: Clone new addition - if: steps.removal.outputs.removal != 'true' - run: | - repo=$(python3 -m scripts.changed.repo) - git clone --depth 1 "https://github.com/$repo" /tmp/repositories/addition - - - name: Upload shared artifacts - if: steps.removal.outputs.removal != 'true' - uses: actions/upload-artifact@v4 - with: - name: repositories - path: /tmp/repositories owner: runs-on: ubuntu-latest @@ -77,12 +65,6 @@ jobs: - name: Check out repository uses: actions/checkout@v4.1.7 - - name: Download shared artifacts - uses: actions/download-artifact@v4 - with: - name: repositories - path: /tmp/repositories - - name: Install dependencies if needed run: scripts/setup @@ -90,6 +72,7 @@ jobs: run: python3 -m scripts.check.owner env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPOSITORY: ${{needs.preflight.outputs.repository}} edits: runs-on: ubuntu-latest @@ -114,11 +97,10 @@ jobs: - name: Check out repository uses: actions/checkout@v4.1.7 - - name: Download shared artifacts - uses: actions/download-artifact@v4 - with: - name: repositories - path: /tmp/repositories + - name: Clone new addition + if: steps.removal.outputs.removal != 'true' + run: | + git clone --depth 1 "https://github.com/${{needs.preflight.outputs.repository}}" /tmp/repositories/addition - name: Get hassfest action run: | @@ -149,4 +131,4 @@ jobs: uses: "hacs/action@main" with: repository: ${{needs.preflight.outputs.repository}} - category: ${{needs.preflight.outputs.category}} \ No newline at end of file + category: ${{needs.preflight.outputs.category}} diff --git a/scripts/check/owner.py b/scripts/check/owner.py index 024d9a5..685cb34 100644 --- a/scripts/check/owner.py +++ b/scripts/check/owner.py @@ -1,7 +1,6 @@ import asyncio import os -from scripts.changed.repo import get_repo from scripts.helpers.event import get_event from scripts.remove_publishers import REMOVED_PUBLISHERS from aiogithubapi import GitHub, AIOGitHubAPIException @@ -11,7 +10,7 @@ TOKEN = os.getenv("GITHUB_TOKEN") async def check(): print("Information: https://hacs.xyz/docs/publish/include#check-owner") - repo = get_repo() + repo = os.environ["REPOSITORY"] event = get_event() actor = event["pull_request"]["user"]["login"] repo_owner = repo.split("/")[0].lower()