Check for new versions #326
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
name: Check for new versions | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 13 * * 1" # Every Monday at 1PM UTC (9AM EST) | |
jobs: | |
check-new-versions: | |
runs-on: ubuntu-latest | |
container: ghcr.io/spack/ubuntu-jammy:latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: key4hep-spack | |
repository: key4hep/key4hep-spack | |
- uses: actions/checkout@v4 | |
with: | |
path: eic-spack | |
- name: Check for new versions and create issue | |
id: new_versions | |
env: | |
COMMENT_BOT_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
shell: bash | |
run: | | |
source /opt/spack/share/spack/setup-env.sh | |
spack repo add --scope site ${GITHUB_WORKSPACE}/key4hep-spack | |
spack repo add --scope site ${GITHUB_WORKSPACE}/eic-spack | |
bash eic-spack/.github/scripts/checksum_new_versions.sh | |
echo "files=$(git -C ${GITHUB_WORKSPACE}/eic-spack diff --name-only | xargs -L1 -r dirname | xargs -L1 -r basename | xargs)" >> $GITHUB_OUTPUT | |
echo "diffstat<<EOF" >> $GITHUB_OUTPUT | |
git -C ${GITHUB_WORKSPACE}/eic-spack diff --stat >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
path: eic-spack | |
branch-suffix: short-commit-hash | |
title: New package versions found for ${{ steps.new_versions.outputs.files }} | |
body: | | |
New package versions found: | |
${{ steps.new_versions.outputs.diffstat }} | |
assignees: wdconinc |