Outdated packages #58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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}" |