Skip to content

Scheduled Versions and Dictionary verification #1630

Scheduled Versions and Dictionary verification

Scheduled Versions and Dictionary verification #1630

Workflow file for this run

---
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2021 - 2023
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
name: Scheduled Versions and Dictionary verification
# yamllint disable-line rule:truthy
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions: read-all
jobs:
check-versions:
name: Update python requirements files
permissions:
contents: write # for technote-space/create-pr-action to push code
pull-requests: write # for technote-space/create-pr-action to create a PR
strategy:
max-parallel: 1
fail-fast: false
# NOTE: https://docs.openstack.org/kolla-ansible/latest/user/support-matrix
matrix:
include:
- distro: debian_11
os_release: 2023.2
python_version: 3.9
- distro: debian_12
os_release: 2023.2
python_version: 3.11
- distro: rocky_9
os_release: 2023.2
python_version: 3.9
- distro: ubuntu_22
os_release: 2023.2
python_version: "3.10"
- distro: debian_11
os_release: 2024.1
python_version: 3.9
- distro: debian_12
os_release: 2024.1
python_version: 3.11
- distro: rocky_9
os_release: 2024.1
python_version: 3.9
- distro: ubuntu_22
os_release: 2024.1
python_version: "3.10"
- distro: debian_12
os_release: 2024.2
python_version: 3.11
- distro: rocky_9
os_release: 2024.2
python_version: 3.11
- distro: ubuntu_22
os_release: 2024.2
python_version: "3.10"
- distro: debian_12
os_release: 2025.1
python_version: 3.11
- distro: rocky_9
os_release: 2025.1
python_version: 3.11
- distro: ubuntu_24
os_release: 2025.1
python_version: 3.12
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
with:
persist-credentials: true
- uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # 7.1.0
with:
enable-cache: true
python-version: ${{ matrix.python_version }}
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # 2.1.4
with:
EXECUTE_COMMANDS: |
uv pip compile --output-file=${GITHUB_WORKSPACE}/requirements/${{ matrix.os_release }}/${{ matrix.distro }}.txt ${GITHUB_WORKSPACE}/requirements/${{ matrix.os_release }}/pyproject.toml --upgrade
COMMIT_MESSAGE: "Upgrade OpenStack Kolla dependencies"
COMMIT_NAME: "electrocucaracha bot"
PR_BRANCH_NAME: "versions-update-${PR_ID}"
PR_TITLE: "chore: update versions"
check-dictionary:
runs-on: ubuntu-latest
permissions:
contents: write # for technote-space/create-pr-action to push code
pull-requests: write # for technote-space/create-pr-action to create a PR
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
with:
persist-credentials: true
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # 2.1.4
with:
EXECUTE_COMMANDS: |
sudo apt-get update
sudo apt-get -y --no-install-recommends install aspell aspell-en
python -m pip install pyspelling
sort --ignore-case --output=original.dic .github/.wordlist.txt
echo "" > .github/.wordlist.txt
# Remove leftovers
pyspelling -c .spellcheck.yml | sed '/^<.*>/d;/^!!!/d;/^--/d;/^Misspelled words:/d;/^$/d;/^Spelling check passed :)$/d' | sort --ignore-case | uniq --ignore-case | tee draft.dic
comm -12 --nocheck-order draft.dic original.dic > .github/.wordlist.txt
sort --ignore-case --output=.github/.wordlist.txt .github/.wordlist.txt
# Add missing words
pyspelling -c .spellcheck.yml | sed '/^<.*>/d;/^!!!/d;/^--/d;/^Misspelled words:/d;/^$/d;/^Spelling check passed :)$/d' | sort --ignore-case | uniq --ignore-case | tee --append .github/.wordlist.txt
sort --ignore-case --output=.github/.wordlist.txt .github/.wordlist.txt
COMMIT_MESSAGE: "Update dictionary definitions"
COMMIT_NAME: "spellchecker bot"
PR_BRANCH_NAME: "versions-update-${PR_ID}"
PR_TITLE: "chore: update dictionary"
check-github-actions:
runs-on: ubuntu-latest
permissions:
contents: write # for technote-space/create-pr-action to push code
pull-requests: write # for technote-space/create-pr-action to create a PR
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
with:
# Fine-grained PAT with contents:write and workflows:write scopes
token: ${{ secrets.WORKFLOW_TOKEN }}
persist-credentials: true
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # 2.1.4
with:
EXECUTE_COMMANDS: |
./ci/update_versions.sh
COMMIT_MESSAGE: "Update GitHub Actions"
COMMIT_NAME: "gh versions bot"
PR_BRANCH_NAME: "gh-versions-update-${PR_ID}"
PR_TITLE: "chore: update gh"