Skip to content

Commit

Permalink
CI: New 'Periodic update' workflow (#3200)
Browse files Browse the repository at this point in the history
Check monthly if 'config.guess' and 'config.sub' are updated and create
a pull request with updates if that is the case.
  • Loading branch information
echoix committed Nov 28, 2023
1 parent 05f1b61 commit 843b41d
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/periodic_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: Periodic update

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API, or on a schedule.
on:
workflow_dispatch:
schedule:
# At 10:32 on every first Wednesday of the month.
# See https://crontab.guru/#32_10_1-7_*_WED
- cron: "32 10 1-7 * WED"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
update-configure:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Create URL to the run output
id: vars
run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: "Check that autoconf scripts are up-to-date:"
run: |
rm -f config.guess config.sub
wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess
wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
# Display changes, only to follow along in the logs.
- run: git diff config.guess config.sub
- name: Double check if files are modified
run: git status --ignored
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
with:
commit-message: "config.guess + config.sub: updated from http://git.savannah.gnu.org/cgit/config.git/plain/"
branch: periodic/update-configure
title: "configure: update to latest config.guess and config.sub"
labels: "CI,packaging,configure"
body: |
This updates config.guess and config.sub to their latest versions.
If the two files are deleted in this PR, please check the logs of the workflow here:
[Workflow run summary](${{ steps.vars.outputs.run-url }})
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
- name: Check outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 comments on commit 843b41d

Please sign in to comment.