From 58c693ad0df6e0d092ce72c3041617f97c6a5214 Mon Sep 17 00:00:00 2001 From: Michael Aldridge Date: Fri, 1 Apr 2022 23:58:48 -0500 Subject: .github/workflows: clean up cycle check --- .github/workflows/cron.yml | 48 -------------------------------------------- .github/workflows/cycles.yml | 40 ++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 48 deletions(-) delete mode 100644 .github/workflows/cron.yml create mode 100644 .github/workflows/cycles.yml (limited to '.github/workflows') diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml deleted file mode 100644 index 1b53808a758..00000000000 --- a/.github/workflows/cron.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: 'Scheduled tasks' - -on: - schedule: - - cron: '0 18 * * *' - -jobs: - lock: - runs-on: ubuntu-latest - steps: - - uses: dessant/lock-threads@v2 - with: - github-token: ${{ github.token }} - pr-lock-inactive-days: '90' - process-only: 'prs' - cycles: - runs-on: ubuntu-latest - container: - image: 'ghcr.io/void-linux/xbps-src-masterdir:20210313rc01-x86_64-musl' - steps: - - name: Prepare container - run: | - # Sync and upgrade once, assume error comes from xbps update - xbps-install -Syu || xbps-install -yu xbps - # Upgrade again (in case there was a xbps update) - xbps-install -yu - # Install script dependencies - xbps-install -y python3-networkx github-cli - - uses: actions/checkout@v1 - with: - fetch-depth: 1 - - name: Create hostrepo and prepare masterdir - run: | - ln -s "$(pwd)" /hostrepo && - common/travis/set_mirror.sh && - common/travis/prepare.sh - - name: Find cycles and open issues - run: | - common/scripts/xbps-cycles.py | tee cycles - grep 'Cycle:' cycles | while read -r line; do - if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then - printf "Issue on '%s' already exists.\n" "$line" - else - gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line" - fi - done - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml new file mode 100644 index 00000000000..e75297ac937 --- /dev/null +++ b/.github/workflows/cycles.yml @@ -0,0 +1,40 @@ +name: 'Cycle Check' + +on: + schedule: + - cron: '0 18 * * *' + +jobs: + cycles: + runs-on: ubuntu-latest + container: + image: 'ghcr.io/void-linux/xbps-src-masterdir:20210313rc01-x86_64-musl' + steps: + - name: Prepare container + run: | + # Sync and upgrade once, assume error comes from xbps update + xbps-install -Syu || xbps-install -yu xbps + # Upgrade again (in case there was a xbps update) + xbps-install -yu + # Install script dependencies + xbps-install -y python3-networkx github-cli + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + - name: Create hostrepo and prepare masterdir + run: | + ln -s "$(pwd)" /hostrepo && + common/travis/set_mirror.sh && + common/travis/prepare.sh + - name: Find cycles and open issues + run: | + common/scripts/xbps-cycles.py | tee cycles + grep 'Cycle:' cycles | while read -r line; do + if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then + printf "Issue on '%s' already exists.\n" "$line" + else + gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line" + fi + done + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }} -- cgit v1.2.3