Skip to content

Commit

Permalink
chore: add manual trigger for Polkadot releases dependencies (#463)
Browse files Browse the repository at this point in the history
Fixes KILTprotocol/ticket#2403.

I was playing around with `subalfred` and found out this nice feature,
which we might want to integrate into our update flow. The action is
configured to be run manually by providing the versions we are updating
from and to.

~There is one thing that would break if we keep changing the weekly
board project name to include the sprint goal, I think we could start
tracking that separately.~ -> replaced `project-name` with
`project-number`, thanks @ggera

What do you guys think? Would it make sense?
  • Loading branch information
ntn-x2 authored Feb 22, 2023
1 parent d8ff39e commit 29e9c2b
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/polkadot-release-list.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: create-polkadot-release-ticket

on:
workflow_dispatch:
inputs:
current-version:
description: Current version of the Polkadot/Cumulus dependency
required: true
type: string
target-version:
description: Target version of the Polkadot/Cumulus dependency
required: true
type: string
asignee:
description: Person assigned for this upgrade
required: false
default: weichweich
type: choice
options:
- weichweich
- ntn-x2
- trusch
- Ad96el

jobs:
create-ticket:
runs-on: ubuntu-latest
steps:
- name: Install cargo
run: curl https://sh.rustup.rs -sSf | sh
- name: Install subalfred
env:
- SUBALFRED_VERSION: 0.9.1
run: cargo install --version $SUBALFRED_VERSION --git /~https://github.com/hack-ink/subalfred.git subalfred
- name: Run subalfred for Substrate
run: subalfred track-updates paritytech/substrate --from polkadot-v${{ inputs.current-version }} --to polkadot-v${{ inputs.target-version }} > substrate-out.md
- name: Run subalfred for Cumulus
run: subalfred track-updates paritytech/cumulus --from polkadot-v${{ inputs.current-version }} --to polkadot-v${{ inputs.target-version }} > cumulus-out.md
- name: Merge outputs into single file
run: |
echo "## Substrate changes" > out.md
cat substrate-out.md >> out.md
echo "## Cumulus changes" >> out.md
cat cumulus-out.md >> out.md
- name: Create issue from commands output
id: new-issue
uses: peter-evans/create-issue-from-file@v3
with:
title: "chore: update Polkadot dependencies from ${{ inputs.current-version }} to ${{ inputs.target-version }}"
repository: KILTProtocol/ticket
token: ${{ secrets.REPO_ACCESS_TOKEN }}
content-filepath: out.md
- name: Put issue into weekly board
uses: peter-evans/create-or-update-project-card@v2
with:
# Weekly board
project-number: 24
column-name: "📥 Inbox"
issue-number: ${{ steps.new-issue.outputs.issue-number }}

0 comments on commit 29e9c2b

Please sign in to comment.