Outdated packages #64
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/checkout@v4.1.5" | |
- | |
name: "Set up PHP" | |
uses: "shivammathur/setup-php@2.30.0" | |
with: | |
php-version: "8.2" | |
coverage: "none" | |
- | |
name: "Install dependencies" | |
uses: "ramsey/composer-install@3.0.0" | |
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/checkout@v4.1.5" | |
- | |
name: "Set up Node.js" | |
uses: "actions/setup-node@v4.0.1" | |
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/checkout@v4.1.5" | |
- | |
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}" |