mirror of
https://github.com/gradle/actions.git
synced 2025-04-16 15:59:18 +08:00
69 lines
2.7 KiB
YAML
69 lines
2.7 KiB
YAML
name: 'Update Wrapper checksums file'
|
|
|
|
on:
|
|
# Run weekly (at arbitrary time)
|
|
schedule:
|
|
- cron: '24 5 * * 6'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
update-checksums:
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
name: Update checksums
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: sources/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
npm clean-install typed-rest-client@1.8.11 --no-save
|
|
working-directory: sources
|
|
|
|
- name: Update checksums file
|
|
run: node ../.github/workflows/update-checksums-file.js
|
|
working-directory: sources
|
|
|
|
- name: Import GPG key to sign commits
|
|
uses: crazy-max/ghaction-import-gpg@v6
|
|
with:
|
|
gpg_private_key: ${{ secrets.GH_BOT_PGP_PRIVATE_KEY }}
|
|
passphrase: ${{ secrets.GH_BOT_PGP_PASSPHRASE }}
|
|
git_user_signingkey: true
|
|
git_commit_gpgsign: true
|
|
git_config_global: true
|
|
|
|
# If there are no changes, this action will not create a pull request
|
|
- name: Create or update pull request
|
|
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
|
with:
|
|
branch: bot/wrapper-checksums-update
|
|
author: bot-githubaction <bot-githubaction@gradle.com>
|
|
committer: bot-githubaction <bot-githubaction@gradle.com>
|
|
commit-message: Update known wrapper checksums
|
|
title: Update known wrapper checksums
|
|
# Note: Unfortunately this action cannot trigger the regular workflows for the PR automatically, see
|
|
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
|
|
# Therefore suggest below to close and then reopen the PR
|
|
body: |
|
|
Automatically generated pull request to update the known wrapper checksums.
|
|
|
|
In case of conflicts, manually run the workflow from the [Actions tab](https://github.com/gradle/actions/actions/workflows/update-checksums-file.yml), the changes will then be force-pushed onto this pull request branch.
|
|
Do not manually update the pull request branch; those changes might get overwritten.
|
|
|
|
> [!IMPORTANT]
|
|
> GitHub workflows have not been executed for this pull request yet. Before merging, close and then directly reopen this pull request to trigger the workflows.
|