|
| 1 | +--- |
| 2 | +name: Periodic update |
| 3 | + |
| 4 | +# Controls when the action will run. Workflow runs when manually triggered using the UI |
| 5 | +# or API, or on a schedule. |
| 6 | +on: |
| 7 | + workflow_dispatch: |
| 8 | + schedule: |
| 9 | + # At 10:32 on every first Wednesday of the month. |
| 10 | + # See https://crontab.guru/#32_10_1-7_*_WED |
| 11 | + - cron: "32 10 1-7 * WED" |
| 12 | + |
| 13 | +# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 14 | +jobs: |
| 15 | + update-configure: |
| 16 | + # The type of runner that the job will run on |
| 17 | + runs-on: ubuntu-latest |
| 18 | + |
| 19 | + # Steps represent a sequence of tasks that will be executed as part of the job |
| 20 | + steps: |
| 21 | + - name: Create URL to the run output |
| 22 | + id: vars |
| 23 | + run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT |
| 24 | + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 25 | + - name: "Check that autoconf scripts are up-to-date:" |
| 26 | + run: | |
| 27 | + rm -f config.guess config.sub |
| 28 | + wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess |
| 29 | + wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub |
| 30 | + # Display changes, only to follow along in the logs. |
| 31 | + - run: git diff config.guess config.sub |
| 32 | + - name: Double check if files are modified |
| 33 | + run: git status --ignored |
| 34 | + - name: Create Pull Request |
| 35 | + id: cpr |
| 36 | + uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2 |
| 37 | + with: |
| 38 | + commit-message: "config.guess + config.sub: updated from http://git.savannah.gnu.org/cgit/config.git/plain/" |
| 39 | + branch: periodic/update-configure |
| 40 | + title: "configure: update to latest config.guess and config.sub" |
| 41 | + labels: "CI,packaging,configure" |
| 42 | + body: | |
| 43 | + This updates config.guess and config.sub to their latest versions. |
| 44 | + If the two files are deleted in this PR, please check the logs of the workflow here: |
| 45 | + [Workflow run summary](${{ steps.vars.outputs.run-url }}) |
| 46 | +
|
| 47 | + Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action |
| 48 | + - name: Check outputs |
| 49 | + if: ${{ steps.cpr.outputs.pull-request-number }} |
| 50 | + run: | |
| 51 | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" |
| 52 | + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
0 commit comments