Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a workflow to pull in initial config changes automatically #157

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/check-initial-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Check for updates on initial config"
on:
workflow_dispatch:
schedule:
- cron: "0 11 * * *"

permissions:
id-token: write
contents: write

jobs:
update-initial-config:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Get latest initial-config file
run: |
curl -s https://raw.githubusercontent.com/Chia-Network/chia-blockchain/refs/heads/latest/chia/util/initial-config.yaml -o ./pkg/config/initial-config.yml

- name: Set up commit signing
uses: Chia-Network/actions/commit-sign/gpg@main
with:
gpg_private_key: ${{ secrets.CHIA_AUTOMATION_PRIVATE_GPG_KEY }}
passphrase: ${{ secrets.CHIA_AUTOMATION_PRIVATE_GPG_PASSPHRASE }}

- name: "Create Pull Request"
uses: peter-evans/create-pull-request@v6
with:
base: main
branch: initial-config-update
commit-message: "Add updated initial config from chia-blockchain"
delete-branch: true
reviewers: "cmmarslender"
assignees: "cmmarslender"
title: "Initial Config Update"
body: "Add updated initial config from chia-blockchain\n\nThis PR likely needs to be accompanied by manual config type updates"
token: "${{ secrets.GITHUB_TOKEN }}"
committer: "ChiaAutomation <[email protected]>"
author: "ChiaAutomation <[email protected]>"