Skip to content

Commit

Permalink
TEST
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rj1k committed Jan 29, 2024
1 parent 7b26339 commit 95dbae8
Showing 1 changed file with 110 additions and 5 deletions.
115 changes: 110 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,24 @@ on:
concurrency:
group: ${{ github.head_ref || github.ref }}

# TEST2

jobs:
build_rpm:
name: 'Build RPM'
uses: s3rj1k/actions-template/.github/workflows/ci-rpm-packages.yml@CMake_RPM
with:
PROJECT_NAME: libks
RUNNER: ubuntu-latest
PACKAGER: 'packager Andrey Volk <andrey@signalwire.com>'
PLATFORM: amd64
USE_CMAKE: true
CMAKE_BUILD_TYPE: 'Debug'
secrets: inherit

build_deb:
name: 'Build DEB'
uses: signalwire/actions-template/.github/workflows/ci-deb-packages-v2.yml@main
uses: s3rj1k/actions-template/.github/workflows/ci-deb-packages-v2.yml@CMake_RPM
strategy:
fail-fast: false
matrix:
Expand All @@ -38,6 +52,23 @@ jobs:
USE_CMAKE: true
CMAKE_BUILD_TYPE: 'Debug'

generate_meta_rpm:
if: (github.ref_type == 'branch' && github.base_ref == '')
name: 'Meta RPM'
needs: [ build_rpm ]
strategy:
matrix:
os:
- rpm
platform:
- amd64
uses: s3rj1k/actions-template/.github/workflows/ci-libs-metadata-v2.yml@CMake_RPM
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.platform }}-artifact
OS_PLATFORM: ${{ matrix.os }}-${{ matrix.platform }}
RUNNER: ubuntu-latest
FILE_PATH_PREFIX: /var/www/libks-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}

generate_meta_deb:
if: (github.ref_type == 'branch' && github.base_ref == '')
name: 'Meta DEB'
Expand All @@ -54,13 +85,38 @@ jobs:
platform:
- amd64
- armhf
uses: signalwire/actions-template/.github/workflows/ci-libs-metadata-v2.yml@main
uses: s3rj1k/actions-template/.github/workflows/ci-libs-metadata-v2.yml@CMake_RPM
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}-artifact
OS_PLATFORM: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}
RUNNER: ubuntu-latest
FILE_PATH_PREFIX: /var/www/libks-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}

distribute_matrix_rpm:
if: (github.ref_type == 'branch' && github.base_ref == '')
permissions: write-all
name: 'Copy to remote RPM'
needs: [ build_rpm ]
strategy:
matrix:
os:
- rpm
platform:
- amd64
uses: s3rj1k/actions-template/.github/workflows/cd-scp.yml@CMake_RPM
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.platform }}-artifact
TARGET_FOLDER: /var/www/libks-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}
RUNNER: ubuntu-latest
FILES: '*.tar.gz'
CREATE_DESTINATION_FOLDERS: true
secrets:
# Explicit define secrets for better understanding but it could be just inherit
PROXY_URL: ${{ secrets.PROXY_URL }}
USERNAME: ${{ secrets.USERNAME }}
HOSTNAME: ${{ secrets.HOSTNAME }}
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}

distribute_matrix_deb:
if: (github.ref_type == 'branch' && github.base_ref == '')
permissions: write-all
Expand All @@ -78,7 +134,7 @@ jobs:
platform:
- amd64
- armhf
uses: signalwire/actions-template/.github/workflows/cd-scp.yml@main
uses: s3rj1k/actions-template/.github/workflows/cd-scp.yml@CMake_RPM
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}-artifact
TARGET_FOLDER: /var/www/libks-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}
Expand All @@ -92,6 +148,33 @@ jobs:
HOSTNAME: ${{ secrets.HOSTNAME }}
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}

distribute_meta_rpm:
if: (github.ref_type == 'branch' && github.base_ref == '')
permissions: write-all
name: 'Copy meta to remote RPM'
needs: [ generate_meta_rpm ]
strategy:
max-parallel: 1
matrix:
os:
- rpm
platform:
- amd64
uses: s3rj1k/actions-template/.github/workflows/cd-libs-metadata.yml@CMake_RPM
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.platform }}-meta
LIB_NAME: sofia-sip
SOURCE_BRANCH: ${{ github.ref_name }}
TARGET_OS: ${{ matrix.os }}
TARGET_PLATFORM: ${{ matrix.platform }}
RUNNER: ubuntu-latest
TARGET_REPO: signalwire/bamboo_gha_trigger
secrets:
GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }}
concurrency:
group: libks-${{ matrix.os }}-${{ matrix.platform }}
cancel-in-progress: false

distribute_meta_deb:
if: (github.ref_type == 'branch' && github.base_ref == '')
permissions: write-all
Expand All @@ -110,7 +193,7 @@ jobs:
platform:
- amd64
- armhf
uses: signalwire/actions-template/.github/workflows/cd-libs-metadata.yml@main
uses: s3rj1k/actions-template/.github/workflows/cd-libs-metadata.yml@CMake_RPM
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}-meta
LIB_NAME: libks
Expand All @@ -125,12 +208,34 @@ jobs:
group: libks-${{ matrix.os }}-${{ matrix.platform }}
cancel-in-progress: true

distribute_hash_rpm:
if: (github.ref_type == 'branch' && github.base_ref == '')
permissions: write-all
name: 'Copy hash to remote RPM'
needs: [ distribute_meta_rpm ]
uses: s3rj1k/actions-template/.github/workflows/cd-scp.yml@CMake_RPM
strategy:
matrix:
os:
- rpm
platform:
- amd64
with:
RUNNER: ubuntu-latest
CREATE_DESTINATION_FOLDERS: false
EXEC_COMMANDS: 'echo "${{ github.sha }}" > /var/www/libks-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}/hash.txt'
secrets:
PROXY_URL: ${{ secrets.PROXY_URL }}
USERNAME: ${{ secrets.USERNAME }}
HOSTNAME: ${{ secrets.HOSTNAME }}
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}

distribute_hash_deb:
if: (github.ref_type == 'branch' && github.base_ref == '')
permissions: write-all
name: 'Copy hash to remote DEB'
needs: [ distribute_meta_deb ]
uses: signalwire/actions-template/.github/workflows/cd-scp.yml@main
uses: s3rj1k/actions-template/.github/workflows/cd-scp.yml@CMake_RPM
strategy:
matrix:
os:
Expand Down

0 comments on commit 95dbae8

Please sign in to comment.