Skip to content

Commit

Permalink
Merge pull request #19 from keithbennett/keith/test
Browse files Browse the repository at this point in the history
m
  • Loading branch information
keithbennett committed Sep 9, 2024
2 parents afd50b3 + e4641e7 commit 6c2c03e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 93 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/auto_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ name: auto-pr
on:
push:
branches:
- 4.*-devel
- main

jobs:
pull-request:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set branch variables
run: BASE_REF=$(echo $GITHUB_REF | cut -f3- -d\/);
run: env; BASE_REF=$(echo $GITHUB_REF | cut -f3- -d\/);
major=$(echo $BASE_REF | cut -f1 -d\.);
minor=$(echo $BASE_REF | cut -f2 -d\. | cut -f1 -d\-);
DEST_BRANCH=$major.$((minor+1))-devel;
Expand All @@ -27,16 +27,13 @@ jobs:
echo "DEST_BRANCH=$DEST_BRANCH" >> $GITHUB_ENV;

- name: Create Pull Request
id: open-pr
uses: repo-sync/pull-request@v2
with:
destination_branch: ${{ env.DEST_BRANCH }}
github_token: ${{ secrets.GITHUB_TOKEN }}
pr_title: "Pull $BASE_REF into $DEST_BRANCH"
pr_label: "auto-pr"
id: open_pr
run: gh pr create -B $BASE_REF -H $DEST_BRANCH --title "Pull $BASE_REF into $DEST_BRANCH" --body "";
echo "pull_request_number=$(gh pr view --json number -q .number || echo "")" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Auto approve
uses: hmarr/auto-approve-action@v2
uses: hmarr/auto-approve-action@v4
with:
github-token: ${{ secrets.GH_APPROVE }}
pull-request-number: ${{ steps.open-pr.outputs.pr_number }}
pull-request-number: ${{ steps.open_pr.outputs.pull_request_number }}
80 changes: 0 additions & 80 deletions .github/workflows/build_test.yml

This file was deleted.

0 comments on commit 6c2c03e

Please sign in to comment.