]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[GHA] Rework `pull_request_target` workflow. 2505/head
authors3rj1k <evasive.gyron@gmail.com>
Tue, 25 Jun 2024 18:35:43 +0000 (20:35 +0200)
committers3rj1k <evasive.gyron@gmail.com>
Tue, 25 Jun 2024 18:39:31 +0000 (20:39 +0200)
.github/workflows/build-from-fork.yml [new file with mode: 0644]
.github/workflows/build.yml

diff --git a/.github/workflows/build-from-fork.yml b/.github/workflows/build-from-fork.yml
new file mode 100644 (file)
index 0000000..0fe53c2
--- /dev/null
@@ -0,0 +1,75 @@
+name: Build from fork
+
+on:
+  pull_request_target:
+    types:
+      - ready_for_review
+    paths:
+      - '**'
+      - '!.github/'
+  workflow_dispatch:
+
+concurrency:
+  group: ${{ github.head_ref || github.ref }}
+
+jobs:
+  deb:
+    name: 'DEB'
+    strategy:
+      max-parallel: 1
+      fail-fast: true
+      matrix:
+        os:
+          - debian
+        version:
+          - bookworm
+          - bullseye
+          - buster
+        platform:
+          - name: amd64
+            runner: ubuntu-latest
+          - name: arm32v7
+            runner: linux-arm64-4-core-public
+          - name: arm64v8
+            runner: linux-arm64-4-core-public
+        exclude:
+          - version: bookworm
+            platform:
+              name: amd64
+          - version: bookworm
+            platform:
+              name: arm64v8
+          - version: bullseye
+
+    runs-on: ${{ matrix.platform.runner }}
+
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v4
+        with:
+          ref: ${{ github.event.pull_request.head.sha }}
+          fetch-depth: 0
+          path: code
+
+      - name: Checkout reusable actions
+        uses: actions/checkout@v4
+        with:
+          repository: signalwire/actions-template
+          ref: main
+          fetch-depth: 1
+          path: actions
+          sparse-checkout: |
+            .github/actions/docker-build-artifacts/action.yml
+          sparse-checkout-cone-mode: false
+
+      - name: Build artifacts via Docker
+        uses: ./actions/.github/actions/docker-build-artifacts
+        with:
+          REPO_DOMAIN: freeswitch.signalwire.com
+          PLATFORM: ${{ matrix.platform.name }}
+          DOCKERFILE: .github/docker/${{ matrix.os }}/${{ matrix.version }}/${{ matrix.platform.name }}/Dockerfile
+          MAINTAINER: 'Andrey Volk <andrey@signalwire.com>'
+          WORKING_DIRECTORY: code
+        env:
+          REPO_USERNAME: 'SWUSERNAME'
+          REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }}
index a3be4b2c2c48b9d16b45cb441f06ee68bdbd1bc6..df3baa49924f5d54bfa0a549ead1f37e9d42a6f6 100644 (file)
@@ -1,12 +1,6 @@
 name: Build and Distribute
 
 on:
-  pull_request_target:
-    types:
-      - ready_for_review
-    paths:
-      - '**'
-      - '!.github/'
   pull_request:
   push:
     branches:
@@ -29,7 +23,7 @@ jobs:
         run: |
           JSON="[]"
 
-          if [[ "${{ github.event_name }}" == "pull_request" || "${{ github.event_name }}" == "pull_request_target" ]]; then
+          if [[ "${{ github.event_name }}" == "pull_request" ]]; then
             JSON=$(jq -n '[
               {
                 "version": "bookworm",