GitHub Actions: trigger openvpn-build GHA on success
PATCH 1/1 GitHub Actions: trigger openvpn-build GHA on success
From: Lev Stipakov <[email protected]...>
After successfult builds on all platforms,
start openvpn-build GHA which produces
Windows MSI installers.
--- .github/workflows/build.yaml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-)
.github/workflows/build.yaml +19 -2
@@ -1,6 +1,7 @@ # The name of our workflow name: Build -on: [push, pull_request] +on: + push: jobs: checkuncrustify:
@@ -32,6 +33,7 @@ jobs: - name: Set job status run: test ! -s uncrustify-changes.patch working-directory: openvpn + mingw: strategy: fail-fast: false
@@ -250,7 +252,6 @@ jobs: - name: make check run: make check - macos: runs-on: macos-latest strategy:
@@ -344,3 +345,19 @@ jobs: ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.dll ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.pdb doc/openvpn.8.html + + trigger_openvpn_build: + runs-on: windows-latest + needs: [checkuncrustify, mingw, ubuntu, ubuntu-clang-asan, macos, msvc] + if: github.ref == 'refs/heads/master' + env: + REPO_DISPATCH: ${{ secrets.OPENVPN_BUILD_REPO_DISPATCH }} + + steps: + - name: Repository Dispatch + if: "${{ env.REPO_DISPATCH != '' }}" + uses: peter-evans/[email protected]... + with: + token: ${{ env.REPO_DISPATCH }} + repository: openvpn/openvpn-build + event-type: openvpn-commit
Signature · 1 line
2.23.0.windows.1
Hi,
Il 03/06/22 11:03, Lev Stipakov ha scritto:
Quoted 16 lines
From: Lev Stipakov <[email protected]...>
After successfult builds on all platforms,
start openvpn-build GHA which produces
Windows MSI installers.Signed-off-by Lev Stipakov <[email protected]...>--- .github/workflows/build.yaml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-).github/workflows/build.yaml +0
-0
.github/workflows/build.yaml line 4
Quoted 5 lines
.github/workflows/build.yaml +2
-1@@ -1,6 +1,7 @@ # The name of our workflow name: Build -on: [push, pull_request] +on: + push:
So, does this disable GHA for pull requests? Asking because we allow PRs and testing those as well would be good.
Quoted 29 lines
.github/workflows/build.yaml +7
-1jobs: checkuncrustify:@@ -32,6 +33,7 @@ jobs: - name: Set job status run: test ! -s uncrustify-changes.patch working-directory: openvpn + mingw: strategy: fail-fast: false@@ -250,7 +252,6 @@ jobs: - name: make check run: make check - macos: runs-on: macos-latest strategy:@@ -344,3 +345,19 @@ jobs: ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.dll ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.pdb doc/openvpn.8.html + + trigger_openvpn_build: + runs-on: windows-latest + needs: [checkuncrustify, mingw, ubuntu, ubuntu-clang-asan, macos, msvc] + if: github.ref == 'refs/heads/master' + env:
.github/workflows/build.yaml jobs: · line 363
Quoted 10 lines
.github/workflows/build.yaml +10
-0+ REPO_DISPATCH: ${{ secrets.OPENVPN_BUILD_REPO_DISPATCH }} + + steps: + - name: Repository Dispatch + if: "${{ env.REPO_DISPATCH != '' }}" + uses: peter-evans/[email protected]... + with: + token: ${{ env.REPO_DISPATCH }} + repository: openvpn/openvpn-build + event-type: openvpn-commit
I have not really used GHA, but if this code works, I'm all for this feature.
Samuli
PATCH v2 1/1 GitHub Actions: trigger openvpn-build GHA on success
From: Lev Stipakov <[email protected]...>
After successfult builds on all platforms,
start openvpn-build GHA which produces
Windows MSI installers.
---
v2:
- bring pull_request trigger back
- simplify trigger_openvpn_build run condition
.github/workflows/build.yaml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
.github/workflows/build.yaml +17 -2
@@ -1,6 +1,8 @@ # The name of our workflow name: Build -on: [push, pull_request] +on: + push: + pull_request: jobs: checkuncrustify:
@@ -32,6 +34,7 @@ jobs: - name: Set job status run: test ! -s uncrustify-changes.patch working-directory: openvpn + mingw: strategy: fail-fast: false
@@ -250,7 +253,6 @@ jobs: - name: make check run: make check - macos: runs-on: macos-latest strategy:
@@ -344,3 +346,16 @@ jobs: ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.dll ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.pdb doc/openvpn.8.html + + trigger_openvpn_build: + runs-on: windows-latest + needs: [checkuncrustify, mingw, ubuntu, ubuntu-clang-asan, macos, msvc] + if: ${{ github.event_name != 'pull_request' && github.repository == 'openvpn/openvpn' && github.ref == 'refs/heads/master' }} + + steps: + - name: Repository Dispatch + uses: peter-evans/[email protected]... + with: + token: ${{ secrets.OPENVPN_BUILD_REPO_DISPATCH }} + repository: openvpn/openvpn-build + event-type: openvpn-commit
Signature · 1 line
2.23.0.windows.1
Il 05/06/22 03:40, Lev Stipakov ha scritto:
Quoted 63 lines
From: Lev Stipakov <[email protected]...>
After successfult builds on all platforms,
start openvpn-build GHA which produces
Windows MSI installers.Signed-off-by Lev Stipakov <[email protected]...>---
v2:- bring
pull_requesttrigger back
- simplifytrigger_openvpn_buildrun condition.github/workflows/build.yaml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-).github/workflows/build.yaml +17
-2@@ -1,6 +1,8 @@ # The name of our workflow name: Build -on: [push, pull_request] +on: + push: + pull_request: jobs: checkuncrustify:@@ -32,6 +34,7 @@ jobs: - name: Set job status run: test ! -s uncrustify-changes.patch working-directory: openvpn + mingw: strategy: fail-fast: false@@ -250,7 +253,6 @@ jobs: - name: make check run: make check - macos: runs-on: macos-latest strategy:@@ -344,3 +346,16 @@ jobs: ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.dll ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.pdb doc/openvpn.8.html + + trigger_openvpn_build: + runs-on: windows-latest + needs: [checkuncrustify, mingw, ubuntu, ubuntu-clang-asan, macos, msvc] + if: ${{ github.event_name != 'pull_request' && github.repository == 'openvpn/openvpn' && github.ref == 'refs/heads/master' }} + + steps: + - name: Repository Dispatch + uses: peter-evans/[email protected]... + with: + token: ${{ secrets.OPENVPN_BUILD_REPO_DISPATCH }} + repository: openvpn/openvpn-build + event-type: openvpn-commit
From: David Sommerseth <[email protected]...>
Your patch has been applied
commit 6a26cb51297024b563603faf78a33298b5d59f30 master
Author: Lev Stipakov Date: Sun, 05 Jun 2022 00:40:13 +0000
GitHub Actions: trigger openvpn-build GHA on success
Signed-off-by: Lev Stipakov
Patchwork-Id: 2508
URL: https://patchwork.openvpn.net/patch/2508/
Signed-off-by: David Sommerseth
--
kind regards,
David Sommerseth
Quoted 8 lines · David Sommerseth
From: David Sommerseth <[email protected]...>
Your patch has been applied
commit
6a26cb51297024b563603faf78a33298b5d59f30masterAuthor: Lev Stipakov Date: Sun, 05 Jun 2022 00:40:13 +0000
Quoted 7 lines
GitHub Actions: trigger openvpn-build GHA on success
Signed-off-by: Lev Stipakov
Patchwork-Id: 2508
URL: https://patchwork.openvpn.net/patch/2508/
Signed-off-by: David Sommerseth
Unfortunately, my patchwork script failed when creating the reply message and I spotted it too late. The Acked-by line was stripped out.
The proper reply message should have been:
commit 6a26cb51297024b563603faf78a33298b5d59f30 master
Author: Lev Stipakov Date: Sun, 05 Jun 2022 00:40:13 +0000
GitHub Actions: trigger openvpn-build GHA on success
Signed-off-by: Lev Stipakov
Acked-by: Samuli Seppänen
Patchwork-Id: 2508
URL: https://patchwork.openvpn.net/patch/2508/
Signed-off-by: David Sommerseth
Signature · 4 lines
kind regards, David Sommerseth OpenVPN Inc
Hi,
Il 03/06/22 11:03, Lev Stipakov ha scritto:
Quoted 16 lines
From: Lev Stipakov <[email protected]...>
After successfult builds on all platforms,
start openvpn-build GHA which produces
Windows MSI installers.Signed-off-by Lev Stipakov <[email protected]...>--- .github/workflows/build.yaml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-).github/workflows/build.yaml +0
-0
.github/workflows/build.yaml line 4
Quoted 5 lines
.github/workflows/build.yaml +2
-1@@ -1,6 +1,7 @@ # The name of our workflow name: Build -on: [push, pull_request] +on: + push:
I've understood that this change has no effect, but this is a commonly used pattern. So ok with it.
Quoted 29 lines
.github/workflows/build.yaml +7
-1jobs: checkuncrustify:@@ -32,6 +33,7 @@ jobs: - name: Set job status run: test ! -s uncrustify-changes.patch working-directory: openvpn + mingw: strategy: fail-fast: false@@ -250,7 +252,6 @@ jobs: - name: make check run: make check - macos: runs-on: macos-latest strategy:@@ -344,3 +345,19 @@ jobs: ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.dll ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.pdb doc/openvpn.8.html + + trigger_openvpn_build: + runs-on: windows-latest + needs: [checkuncrustify, mingw, ubuntu, ubuntu-clang-asan, macos, msvc] + if: github.ref == 'refs/heads/master' + env:
.github/workflows/build.yaml jobs: · line 363
Quoted 10 lines
.github/workflows/build.yaml +10
-0+ REPO_DISPATCH: ${{ secrets.OPENVPN_BUILD_REPO_DISPATCH }} + + steps: + - name: Repository Dispatch + if: "${{ env.REPO_DISPATCH != '' }}" + uses: peter-evans/[email protected]... + with: + token: ${{ env.REPO_DISPATCH }} + repository: openvpn/openvpn-build + event-type: openvpn-commit
Not having done much with GHA I can't tell if this is correct. But we do want this feature and Lev has tested it, so ACK.
Samuli