Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
JackPGreen2 authored Nov 13, 2024
1 parent a7313c7 commit db54a88
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 35 deletions.
6 changes: 1 addition & 5 deletions .github/actions/backport/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: Backport changes
on:
workflow_call:
inputs:
token:
required: true
type: string
label:
description: Triggering label to check for
required: true
Expand All @@ -19,12 +16,11 @@ jobs:
runs-on: ubuntu-latest

steps:

- name: Check PR for backport label
id: check_pr_labels
uses: shioyang/[email protected]
with:
github-token: ${{ inputs.token }}
# github-token: ${{ inputs.token }}
labels: ${{ inputs.label }}

- name: See result
Expand Down
34 changes: 15 additions & 19 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,18 @@ jobs:
strategy:
matrix:
branch: ['5.0', '5.1', '5.2', '5.3', '5.4', '5.5']
runs-on: ubuntu-latest
steps:
# TODO USE REMOTE DIRECTLY
- name: checkout
uses: actions/checkout@v4

- name: Backport to all maintenance branches
uses: ./.github/actions/backport
with:
token: ${{ secrets.GITHUB_TOKEN }}
label: '["backport to all versions"]'
target-branch: v/${{ matrix.branch }}

- name: Backport to specified branch
uses: ./.github/actions/backport
with:
token: ${{ secrets.GITHUB_TOKEN }}
label: '["backport to ${{ matrix.branch }}"]'
target-branch: v/${{ matrix.branch }}'
uses: ./.github/actions/backport/action.yml
with:
label: '["backport to all versions"]'
target-branch: v/${{ matrix.branch }}
secrets: inherit
# TODO COMBINE
backport2:
strategy:
matrix:
branch: ['5.0', '5.1', '5.2', '5.3', '5.4', '5.5']
uses: ./.github/actions/backport/action.yml
with:
label: '["backport to ${{ matrix.branch }}"]'
target-branch: v/${{ matrix.branch }}'
secrets: inherit
17 changes: 6 additions & 11 deletions .github/workflows/forwardport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@ on:
- v/*
jobs:
forwardport:
runs-on: ubuntu-latest
steps:
# TODO USE REMOTE DIRECTLY
- name: checkout
uses: actions/checkout@v4

- uses: ./.github/actions/backport
with:
token: ${{ secrets.GITHUB_TOKEN }}
label: '["forwardport to snapshot"]'
target-branch: main
# TODO RENAME
uses: ./.github/actions/backport/action.yml
with:
label: '["forwardport to snapshot"]'
target-branch: main
secrets: inherit

0 comments on commit db54a88

Please sign in to comment.