CI: Move the clear-failed actions into its own workflow

So they can be run independently.
This commit is contained in:
Christoph Reiter 2022-04-18 17:25:11 +02:00
parent 892e1a3206
commit cb4434c72b
2 changed files with 58 additions and 26 deletions

View File

@ -8,16 +8,6 @@ on:
default: ''
required: false
type: string
clear_failed_packages:
description: 'clear_failed_packages=mingw-w64-foo,mingw-w64-bar'
default: ''
required: false
type: string
clear_failed_build_types:
description: 'clear_failed_build_types=mingw64,clang64'
default: ''
required: false
type: string
schedule:
- cron: '0 0/3 * * *'
@ -51,22 +41,6 @@ jobs:
python -m pip install --user 'wheel==0.37.1'
python -m pip install --user -r requirements.txt
- name: Clear failed build types
if: ${{ github.event.inputs.clear_failed_build_types != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN_READONLY: ${{ secrets.GITHUBTOKENREADONLY }}
run: |
python -u autobuild.py clear-failed --build-types '${{ github.event.inputs.clear_failed_build_types }}'
- name: Clear failed packages
if: ${{ github.event.inputs.clear_failed_packages != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN_READONLY: ${{ secrets.GITHUBTOKENREADONLY }}
run: |
python -u autobuild.py clear-failed --packages '${{ github.event.inputs.clear_failed_packages }}'
- name: Check what we should run
id: check
env:

58
.github/workflows/maint.yml vendored Normal file
View File

@ -0,0 +1,58 @@
name: 'maint'
on:
workflow_dispatch:
inputs:
clear_failed_packages:
description: 'clear_failed_packages=mingw-w64-foo,mingw-w64-bar'
default: ''
required: false
type: string
clear_failed_build_types:
description: 'clear_failed_build_types=mingw64,clang64'
default: ''
required: false
type: string
permissions:
contents: write
concurrency: maint-nope
jobs:
schedule:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.9'
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install deps
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
run: |
python -m pip install --user 'wheel==0.37.1'
python -m pip install --user -r requirements.txt
- name: Clear failed build types
if: ${{ github.event.inputs.clear_failed_build_types != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN_READONLY: ${{ secrets.GITHUBTOKENREADONLY }}
run: |
python -u autobuild.py clear-failed --build-types '${{ github.event.inputs.clear_failed_build_types }}'
- name: Clear failed packages
if: ${{ github.event.inputs.clear_failed_packages != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN_READONLY: ${{ secrets.GITHUBTOKENREADONLY }}
run: |
python -u autobuild.py clear-failed --packages '${{ github.event.inputs.clear_failed_packages }}'