81 lines
2.2 KiB
YAML
81 lines
2.2 KiB
YAML
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
|
|
context:
|
|
description: 'Extra information from invoker'
|
|
default: ''
|
|
required: false
|
|
type: string
|
|
|
|
permissions: {}
|
|
|
|
concurrency: autobuild-maint
|
|
|
|
jobs:
|
|
|
|
schedule:
|
|
runs-on: ubuntu-24.04
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
|
|
- name: Dump inputs
|
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
env:
|
|
CONTEXT: '${{ toJSON(github.event.inputs) }}'
|
|
run: |
|
|
echo "$CONTEXT"
|
|
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
cache: 'pip'
|
|
cache-dependency-path: 'requirements.txt'
|
|
|
|
- name: Install deps
|
|
env:
|
|
PIP_DISABLE_PIP_VERSION_CHECK: 1
|
|
run: |
|
|
python -m venv .venv
|
|
source .venv/bin/activate
|
|
python -m pip install -r requirements.txt
|
|
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
|
|
|
|
- name: Clear failed build types
|
|
if: ${{ github.event.inputs.clear_failed_build_types != '' }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITHUB_TOKEN_READONLY: ${{ secrets.GITHUBTOKENREADONLY }}
|
|
CLEAR_FAILED_BUILD_TYPES: ${{ github.event.inputs.clear_failed_build_types }}
|
|
run: |
|
|
python -m msys2_autobuild clear-failed --build-types "$CLEAR_FAILED_BUILD_TYPES"
|
|
python -m msys2_autobuild update-status
|
|
|
|
- name: Clear failed packages
|
|
if: ${{ github.event.inputs.clear_failed_packages != '' }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITHUB_TOKEN_READONLY: ${{ secrets.GITHUBTOKENREADONLY }}
|
|
CLEAR_FAILED_PACKAGES: ${{ github.event.inputs.clear_failed_packages }}
|
|
run: |
|
|
python -m msys2_autobuild clear-failed --packages "$CLEAR_FAILED_PACKAGES"
|
|
python -m msys2_autobuild update-status
|