Compare commits

...

4 Commits

Author SHA1 Message Date
Jon Häggblad b74ac520ae ci: rename to check-merge-conflicts.yml 2023-02-14 12:37:27 +01:00
Jon Häggblad b2338bc795 ci: also check merge into develop 2023-02-14 12:37:27 +01:00
Jon Häggblad 1b540fc980 ci: set user email 2023-02-14 12:37:27 +01:00
Jon Häggblad 4ed67330b5 ci: fix check-git-branches regex 2023-02-14 12:23:58 +01:00
2 changed files with 59 additions and 34 deletions
-34
View File
@@ -1,34 +0,0 @@
name: check-merge-conflicts
# Check that the latest release branch merges into master and develop
on:
workflow_dispatch:
jobs:
get_release:
runs-on: ubuntu-20.04
outputs:
output1: ${{ steps.step2.outputs.latest_release }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set output variable to latest release branch
id: step2
run: echo "latest_release=$(git branch -r | grep -E 'release/v[0-9]+\.[0-9]+\.[0-9]+' | tail -n 1 | sed 's/ origin\///')" >> $GITHUB_OUTPUT
check-merge-master:
name: Check that the release branch merges into master
needs: get_release
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check merge master
run: |
./.github/workflows/support-files/git-merge-check.sh master $branch1
env:
branch1: ${{needs.get_release.outputs.output1}}
@@ -0,0 +1,59 @@
name: check-merge-conflicts
# Check that the latest release branch merges into master and develop without
# any conflicts that git is not able to resolve
on:
workflow_dispatch:
jobs:
get-release:
runs-on: ubuntu-20.04
outputs:
output1: ${{ steps.step2.outputs.latest_release }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set output variable to latest release branch
id: step2
run: echo "latest_release=$(git branch -r | grep -E 'release/v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1)" >> $GITHUB_OUTPUT
check-merge-release-into-master:
name: Check that the release branch merges into master
needs: get_release
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup git user
run: |
git config --global user.name "ci"
git config --global user.email "ci@localhost"
- name: Check merge release branch into master
run: |
./.github/workflows/support-files/git-merge-check.sh origin/master $branch1
env:
branch1: ${{needs.get_release.outputs.output1}}
check-merge-release-into-develop:
name: Check that the release branch merges into develop
needs: get_release
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup git user
run: |
git config --global user.name "ci"
git config --global user.email "ci@localhost"
- name: Check merge release branch into develop
run: |
./.github/workflows/support-files/git-merge-check.sh origin/develop $branch1
env:
branch1: ${{needs.get_release.outputs.output1}}