Update Holonix versions #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Update Holonix versions" | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: "The Holonix version to update inputs for" | |
required: true | |
default: "main" | |
type: choice | |
options: | |
- main | |
- main-0.4 | |
- main-0.3 | |
update-holochain: | |
description: "Should Holochain be updated?" | |
type: boolean | |
default: false | |
required: true | |
update-scaffolding: | |
description: "Should Scaffolding be updated?" | |
type: boolean | |
default: false | |
required: true | |
update-launcher: | |
description: "Should Launcher be updated?" | |
type: boolean | |
default: false | |
required: true | |
workflow_call: | |
inputs: | |
branch: | |
type: string | |
required: true | |
update-holochain: | |
type: boolean | |
default: false | |
required: false | |
update-scaffolding: | |
type: boolean | |
default: false | |
required: false | |
update-launcher: | |
type: boolean | |
default: false | |
required: false | |
concurrency: | |
group: ${{ github.workflow }}-${{ inputs.branch }} | |
jobs: | |
update-holochain-version: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.branch }} | |
- uses: cachix/install-nix-action@v30 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.24.9/install | |
extra_nix_config: | | |
accept-flake-config = true | |
- name: Run the Holochain and Lair bump scripts | |
if: ${{ inputs.update-holochain }} | |
run: | | |
./scripts/bump-holochain.sh | |
./scripts/bump-lair.sh | |
- name: Run the Scaffolding bump script | |
if: ${{ inputs.update-scaffolding }} | |
run: | | |
nix flake update hc-scaffold | |
- name: Run the Launcher bump script | |
if: ${{ inputs.update-launcher }} | |
run: | | |
nix flake update hc-launch | |
- name: Create pull request | |
id: cpr | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
branch-token: ${{ secrets.HRA_GITHUB_TOKEN }} | |
committer: "Holochain Release Automation <[email protected]>" | |
title: "Update Holonix versions on ${{ inputs.branch }}" | |
body: | | |
Automated Holochain version bump. | |
To apply more updates to this PR you can ask the bot to make changes. Try commenting with: | |
- `@hra bump holochain` | |
- `@hra bump hc-launch` | |
- `@hra bump hc-scaffold` | |
You must be in the list of allowed users for this to work! | |
branch: holochain-update | |
branch-suffix: short-commit-hash | |
draft: false | |
delete-branch: true | |
- name: Enable auto-merge | |
if: steps.cpr.outputs.pull-request-operation == 'created' && github.event_name == 'workflow_dispatch' | |
env: | |
GH_TOKEN: ${{ secrets.HRA_GITHUB_TOKEN }} | |
run: gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}" |