-
Notifications
You must be signed in to change notification settings - Fork 10
60 lines (56 loc) · 2.7 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2021
# 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:
jobs:
check-versions:
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
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: technote-space/[email protected]
with:
EXECUTE_COMMANDS: |
./ci/update_versions.sh
pip install pip-tools
pip-compile test-requirements.in --output-file test-requirements.txt --upgrade --resolver=backtracking
COMMIT_MESSAGE: 'Upgrade galaxy requirements and krd versions files'
COMMIT_NAME: 'electrocucaracha bot'
PR_BRANCH_NAME: "versions-update-${PR_ID}"
PR_TITLE: 'chore: update versions'
check-dictionary:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: technote-space/[email protected]
with:
EXECUTE_COMMANDS: |
sudo apt-get update
sudo apt-get -y --no-install-recommends install aspell aspell-en
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'