Skip to content

Crate fixes (#183) #1208

Crate fixes (#183)

Crate fixes (#183) #1208

Workflow file for this run

name: Check for updates
on:
push:
branches: [ main ]
paths: [ .github/workflows/stable-check.yml, scripts/**, crates/**, Cross.toml, stable.template.yml ]
pull_request:
branches: [ main ]
paths: [ .github/workflows/stable-check.yml, scripts/**, crates/**, Cross.toml, stable.template.yml, pr/_allowlist ]
workflow_dispatch:
schedule:
- cron: '0 6,18 * * *'
jobs:
check:
outputs:
crates: ${{ steps.check.outputs.crates }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Skip Duplicate Actions
if: ${{ github.event_name != 'pull_request' }}
uses: fkirc/skip-duplicate-actions@v5
id: skip
with:
skip_after_successful_duplicate: false
do_not_skip: '["pull_request"]'
concurrent_skipping: always
- name: Check for updates
id: check
run: echo "crates=$(python ./scripts/check.py '${{ github.event_name == 'pull_request' }}' '${{ steps.skip.outputs.should_skip }}' '${{ github.server_url }}' '${{ github.repository }}')" >> $GITHUB_OUTPUT
dispatch:
if: ${{ needs.check.outputs.crates != '{}' }}
strategy:
max-parallel: 1
matrix: ${{ fromJson(needs.check.outputs.crates) }}
runs-on: ubuntu-latest
needs: [ check ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Generate workflow
run: python ./scripts/gen.py ${{ github.event_name == 'pull_request' }} '${{ github.server_url }}/${{ github.repository }}' '${{ matrix.crate }}' '${{ matrix.version }}' '${{ matrix.license }}' '${{ matrix.dl }}' '${{ matrix.checksum }}' '${{ matrix.file }}' '${{ matrix.description }}'
- name: Print generated workflow file
run: cat .github/workflows/stable-${{ matrix.crate }}.yml
- name: Wait
if: ${{ github.event_name != 'pull_request' }}
run: sleep 15m
- name: Run action
uses: antaljanosbenjamin/single-commit-publish@v1.0.1
with:
github-token: ${{ secrets.WORKFLOW_TOKEN }}
branch: trigger/stable
files-and-dirs: '.github/workflows/stable-${{ matrix.crate }}.yml keys/ scripts/collect.py scripts/info.py scripts/misc.py scripts/docker/entrypoint.sh ${{ matrix.file }} Cross.toml'
wait:
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
needs: [ dispatch ]
steps:
- uses: actions/checkout@v4
- run: sleep 15m