From f1cef69aa97a0e20ebe1e0de975a4bd493624700 Mon Sep 17 00:00:00 2001 From: Nicola Sella Date: Wed, 11 Oct 2023 15:29:59 +0200 Subject: [PATCH] test wait-for-packit --- .github/workflows/test-packit.yml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-packit.yml b/.github/workflows/test-packit.yml index ae005fd55..64ea12ee3 100644 --- a/.github/workflows/test-packit.yml +++ b/.github/workflows/test-packit.yml @@ -1,15 +1,33 @@ name: Test Packit on: - workflow_run: - workflows: - - "Packit-as-a-Service" - types: - - completed + pull_request: jobs: test-packit: name: Test if Packit is done runs-on: ubuntu-latest + container: + image: ghcr.io/rpm-software-management/dnf-ci-host steps: + - uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: install wait-for-copr + run: pip install git+https://github.com/packit/wait-for-copr + + - name: wait for copr + env: + # env variables for readability + REPO: ${{ github.repository_owner }} + PROJ: ${{ github.event.repository.name }} + PR: ${{ github.event.number }} + HASH: ${{ github.sha }} + run: | + wait-for-copr --owner packit --project $REPO-$PROJ-$PR $PROJ ${HASH:0:7} + - name: print success run: echo "success"