From 45f088a9e5ef97aaa7ec8b0ffaceb74e4d17c66c Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 17 Oct 2023 07:27:58 +0200 Subject: [PATCH] XXX test check_run --- .github/workflows/trigger-anaconda.yml | 46 ++++++-------------------- 1 file changed, 10 insertions(+), 36 deletions(-) diff --git a/.github/workflows/trigger-anaconda.yml b/.github/workflows/trigger-anaconda.yml index 7054bf381b11..74ec2c31927c 100644 --- a/.github/workflows/trigger-anaconda.yml +++ b/.github/workflows/trigger-anaconda.yml @@ -8,46 +8,20 @@ name: anaconda on: - pull_request_target: - # only bridge and Storage page affect anaconda - paths: - - src/cockpit/** - - pkg/storaged/** + check_run: + types: [completed] jobs: trigger: runs-on: ubuntu-22.04 # the default workflow token cannot read our org membership, for deciding who is allowed to trigger tests - environment: gh-cockpituous - container: registry.fedoraproject.org/fedora:rawhide - # this polls for a COPR build, which can take long - timeout-minutes: 120 + timeout-minutes: 5 steps: - - name: Install dependencies + - name: debug info + env: + GITHUB_CONTEXT: ${{ toJson(github) }} run: | - dnf install -y git-core dnf-plugins-core || { - sleep 60 - dnf install -y git-core dnf-plugins-core - } - - - name: Wait for packit COPR build - run: | - set -ex - COPR_NAME="${{ github.event.pull_request.base.user.login }}-${{ github.event.pull_request.base.repo.name }}-${{ github.event.number }}" - SHA=$(echo "${{ github.event.pull_request.head.sha }}" | cut -c 1-8) - for _ in $(seq 60); do - sleep 60; - if dnf copr enable -y packit/$COPR_NAME && - out=$(dnf info --refresh --repo='copr:*cockpit*' cockpit-bridge) && - echo "$out" | grep -q "Release.*\.g$SHA" ; then - exit 0 - fi - done - exit 1 - - - name: Trigger anaconda run - run: | - git clone --depth=1 https://github.com/cockpit-project/bots - mkdir -p ~/.config/cockpit-dev - echo '${{ secrets.COCKPITUOUS_TOKEN }}' > ~/.config/cockpit-dev/github-token - bots/tests-trigger --repo ${{ github.repository }} ${{ github.event.number }} fedora-rawhide-boot/cockpit-pr-${{ github.event.number }}@rhinstaller/anaconda + set -x + echo "GITHUB_SHA: $GITHUB_SHA" + echo "GITHUB_REF: $GITHUB_REF" + echo "github: $GITHUB_CONTEXT"