mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
53 lines
1.9 KiB
YAML
53 lines
1.9 KiB
YAML
---
|
|
name: Generate Updates for Packages and Their Dependencies.
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version_cmd_input:
|
|
description: "Packages to check for dependency tree updates."
|
|
required: true
|
|
workflow_call:
|
|
inputs:
|
|
version_cmd_input:
|
|
type: string
|
|
required: true
|
|
env:
|
|
GH_TOKEN: ${{ secrets.CREW_PR_TOKEN }} # setting GH_TOKEN for the entire workflow
|
|
permissions: # Global permissions configuration starts here
|
|
actions: write
|
|
contents: write
|
|
packages: write
|
|
pull-requests: write # 'write' access to pull requests
|
|
jobs:
|
|
update-check:
|
|
if: ${{ github.repository_owner == 'chromebrew' }}
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
persist-credentials: true
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '3.4.7'
|
|
- name: Check for updates in core and buildessential packages.
|
|
id: trigger-update-checks
|
|
run: |
|
|
set -x
|
|
# Make crew do automatic gem installs before looking for deps.
|
|
ruby bin/crew version
|
|
# Force creation of temporary device.json.
|
|
ruby bin/crew deps zstd_static
|
|
# Make sure input matches packages in existing packages list.
|
|
export INPUT="${{ inputs.version_cmd_input }}"
|
|
# shellcheck disable=SC2046,SC2155
|
|
export INPUT_PACKAGES="$(comm -12 <(ruby bin/crew list available| sort -u) <(echo $INPUT | tr ' ' '\n'| sort -u))"
|
|
if [[ -n "${INPUT_PACKAGES}" ]]; then
|
|
# shellcheck disable=SC2086,SC2155
|
|
export PACKAGES="$(ruby bin/crew deps $INPUT_PACKAGES | sort -u)"
|
|
else
|
|
echo "No valid input packages found."
|
|
exit 1
|
|
fi
|
|
# shellcheck disable=SC2086,SC2116
|
|
gh workflow -R chromebrew/chromebrew run Updater-on-Demand.yml -f version_cmd_input="$(echo ${PACKAGES})"
|