From 267de5f15de7eb701c19090757c8ec78c46def8b Mon Sep 17 00:00:00 2001 From: Antonio Date: Wed, 22 Feb 2023 17:25:26 +0100 Subject: [PATCH] fix: create ticket GH action (#467) Fixes the leftover issues with the version bump ticket creation action. --------- Co-authored-by: gera --- .github/workflows/add-ticket-to-weekly.yml | 17 +++++++++++ ...ml => polkadot-version-upgrade-ticket.yml} | 29 ++++++++++--------- 2 files changed, 32 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/add-ticket-to-weekly.yml rename .github/workflows/{polkadot-release-list.yml => polkadot-version-upgrade-ticket.yml} (72%) diff --git a/.github/workflows/add-ticket-to-weekly.yml b/.github/workflows/add-ticket-to-weekly.yml new file mode 100644 index 0000000000..8b627fddd2 --- /dev/null +++ b/.github/workflows/add-ticket-to-weekly.yml @@ -0,0 +1,17 @@ +name: Add Polkadot version upgrade ticket to weekly board + +on: + issues: + types: + - opened + +jobs: + add-to-weekly-board: + runs-on: ubuntu-latest + steps: + - name: Add new issue to weekly board + uses: actions/add-to-project@0.4.0 + with: + project-url: https://github.com/orgs/KILTprotocol/projects/24 + github-token: ${{ secrets.REPO_ACCESS_TOKEN }} + labeled: kiltbot diff --git a/.github/workflows/polkadot-release-list.yml b/.github/workflows/polkadot-version-upgrade-ticket.yml similarity index 72% rename from .github/workflows/polkadot-release-list.yml rename to .github/workflows/polkadot-version-upgrade-ticket.yml index b9fd17bd8f..9f6c4d0c55 100644 --- a/.github/workflows/polkadot-release-list.yml +++ b/.github/workflows/polkadot-version-upgrade-ticket.yml @@ -1,4 +1,4 @@ -name: create-polkadot-release-ticket +name: Create Polkadot version upgrade ticket on: workflow_dispatch: @@ -11,7 +11,7 @@ on: description: Target version of the Polkadot/Cumulus dependency required: true type: string - asignee: + assignee: description: Person assigned for this upgrade required: false default: weichweich @@ -25,16 +25,20 @@ on: jobs: create-ticket: runs-on: ubuntu-latest + container: + image: rust:1.67.0 steps: - - name: Install cargo - run: curl https://sh.rustup.rs -sSf | sh - name: Install subalfred env: - - SUBALFRED_VERSION: 0.9.1 + 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 + env: + GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} 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 + env: + GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} 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: | @@ -45,16 +49,13 @@ jobs: - name: Create issue from commands output id: new-issue uses: peter-evans/create-issue-from-file@v3 + env: + GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} with: - title: "chore: update Polkadot dependencies from ${{ inputs.current-version }} to ${{ inputs.target-version }}" - repository: KILTProtocol/ticket + title: "[AUTOMATIC] Update Polkadot dependencies from ${{ inputs.current-version }} to ${{ inputs.target-version }}" + repository: KILTProtocol/kilt-node 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 }} + labels: kiltbot,⛓ KILT node + assignees: ${{ github.event.inputs.assignee }}