Skip to content

Create workflows for porting changes #8596

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

Merged
merged 2 commits into from
Apr 18, 2025
Merged
Show file tree
Hide file tree
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
22 changes: 22 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Port changes to PoB2

on:
pull_request:
types: [closed]

env:
LABEL_STRING: ${{ join(github.event.pull_request.labels.*.name, ',') }}

jobs:
backport:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'pob2')
runs-on: ubuntu-latest
steps:
- name: Notify PathOfBuilding repo
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.WIRES77_PAT }}
repository: ${{ github.repository_owner }}/PathOfBuilding-PoE2
event-type: port-changes
client-payload: '{"patch_url": "${{ github.event.pull_request.patch_url }}", "msg": "Apply changes from ${{ github.event.pull_request.html_url }}", "id": ${{ github.event.pull_request.number }}, "title": "${{ github.event.pull_request.title }}", "labels": "${{ env.LABEL_STRING }}", "name": "${{ github.event.pull_request.user.name }}", "user": "${{ github.event.pull_request.user.login }}"}'

28 changes: 28 additions & 0 deletions .github/workflows/backport_receive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Update code with code from PoB2

on:
repository_dispatch:
types:
- port-changes

jobs:
apply-patch:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: 'dev'
- name: Apply patch
run: |
curl -L ${{ github.event.client_payload.patch_url }} | git apply -v --index
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
title: "[pob2-port] ${{ github.event.client_payload.title }}"
branch: pob2-pr-${{ github.event.client_payload.id }}
body: |
${{ github.event.client_payload.msg }}
author: ${{ github.event.client_payload.name || github.event.client_payload.user }} <${{ github.event.client_payload.user }}@users.noreply.github.com>
commit-message: ${{ github.event.client_payload.msg }}
labels: ${{ github.event.client_payload.labels }}