-
-
Notifications
You must be signed in to change notification settings - Fork 2
97 lines (89 loc) · 2.88 KB
/
outdated.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: "Outdated packages"
on: # yamllint disable-line rule:truthy
schedule:
# Update Monday
- cron: "31 04 * * 1"
workflow_dispatch: null
permissions: {} # yamllint disable-line rule:braces
#permissions: "read-all"
#permissions:
# contents: "read" # Private repositories need read permission
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
env:
NPM_CONFIG_FUND: "false"
jobs:
back_end_packages:
name: "PHP packages"
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
-
name: "Checkout repository"
uses: "actions/[email protected]"
-
name: "Set up PHP"
uses: "shivammathur/[email protected]"
with:
php-version: "8.2"
coverage: "none"
-
name: "Install dependencies"
uses: "ramsey/[email protected]"
with:
dependency-versions: "highest"
-
name: "Show available updates"
run: "composer outdated --direct --strict"
front_end_packages:
name: "Node.js packages"
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
-
name: "Checkout repository"
uses: "actions/[email protected]"
-
name: "Set up Node.js"
uses: "actions/[email protected]"
with:
node-version: "18"
cache: "npm"
-
name: "Configure npm"
run: "npm config set engine-strict true"
# -
# name: "Install all dependencies"
# run: "npm ci"
# -
# name: "Check for outdated packages"
# run: "npm outdated"
-
name: "Install production dependencies"
run: "npm ci --omit=dev"
-
name: "Check for outdated production packages"
run: "npm outdated --omit=dev"
AlDanial_cloc:
name: "AlDanial/cloc"
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
-
name: "Checkout repository"
uses: "actions/[email protected]"
-
name: "Show available updates"
env:
GH_TOKEN: "${{ github.token }}"
run: |
CURRENT_VERSION="$(
cat .github/workflows/reusable-integrity.yml \
| yq -r '."jobs".*."steps"[] | select(."run" | contains("gh api /repos")) | ."run"' \
| sed -n -e 's/^\s*# \(v\S\+\)$/\1/p'
)"
LATEST_VERSION="$(gh api /repos/AlDanial/cloc/releases/latest --jq '."tag_name"')"
echo "LATEST=${LATEST_VERSION}"
test "${CURRENT_VERSION}" = "${LATEST_VERSION}"