Skip to content

Cron

Cron #226

Workflow file for this run

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
name: Cron
jobs:
update-software:
if: ${{ github.repository == 'GlasgowEmbedded/glasgow' }}
runs-on: ubuntu-latest
env:
PDM_LOCKFILE: 'pdm.min.lock'
steps:
- name: Check out source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
- name: Generate min-versions lockfile
working-directory: ./software
run: pdm lock --group :all --strategy direct_minimal_versions
- name: Submit pull request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: 'software: update `pdm.min.lock`.'
branch: update-lockfile
title: 'Update `pdm.min.lock`'
body: '*This pull request was automatically created by the `cron` GitHub Actions workflow.*'
id: create-pull-request
- if: ${{ steps.create-pull-request.outputs.pull-request-number }}
name: Automatically merge pull request
run: gh pr merge --merge --auto ${{ steps.create-pull-request.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}