Merge pull request #2505 from signalwire/gha
[GHA] Rework `pull_request_target` workflow.
This commit is contained in:
commit
f850f835b7
|
@ -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 }}
|
|
@ -1,12 +1,6 @@
|
||||||
name: Build and Distribute
|
name: Build and Distribute
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
|
||||||
types:
|
|
||||||
- ready_for_review
|
|
||||||
paths:
|
|
||||||
- '**'
|
|
||||||
- '!.github/'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
@ -29,7 +23,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
JSON="[]"
|
JSON="[]"
|
||||||
|
|
||||||
if [[ "${{ github.event_name }}" == "pull_request" || "${{ github.event_name }}" == "pull_request_target" ]]; then
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||||
JSON=$(jq -n '[
|
JSON=$(jq -n '[
|
||||||
{
|
{
|
||||||
"version": "bookworm",
|
"version": "bookworm",
|
||||||
|
|
Loading…
Reference in New Issue