Skip to content

Commit

Permalink
WiP
Browse files Browse the repository at this point in the history
Signed-off-by: s3rj1k <[email protected]>
  • Loading branch information
s3rj1k committed Jan 11, 2024
1 parent 6198851 commit 6a71381
Showing 1 changed file with 55 additions and 37 deletions.
92 changes: 55 additions & 37 deletions .github/workflows/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.head_ref || github.ref }}
group: ${{ github.head_ref || github.ref }}

jobs:

sofia_build_rpm:
name: 'Build Rpm'
uses: signalwire/actions-template/.github/workflows/ci-rpm-packages.yml@main
uses: s3rj1k/actions-template/.github/workflows/ci-rpm-packages.yml@ci-deb-packages
with:
PROJECT_NAME: sofia-sip
RUNNER: ubuntu-latest
Expand All @@ -25,56 +24,74 @@ jobs:

sofia_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@ci-deb-packages
strategy:
fail-fast: false
matrix:
BASE_IMAGE:
- signalwire/build-deb-action:bookworm
- signalwire/build-deb-action:bullseye
- signalwire/build-deb-action:buster
- signalwire/build-deb-action:stretch
PLATFORM:
distro_codename:
- bookworm
- bullseye
- buster
- stretch
platform:
- amd64
- arm
with:
PROJECT_NAME: sofia-sip
RUNNER: ubuntu-latest
BASE_IMAGE: ${{matrix.BASE_IMAGE}}
PLATFORM: ${{matrix.PLATFORM}}
BASE_IMAGE: signalwire/build-deb-action
DISTRO_CODENAME: ${{ matrix.distro_codename }}
PLATFORM: ${{ matrix.platform }}

generate_meta:
name: 'Meta'
needs: [sofia_build_rpm, sofia_build_deb]
generate_meta_deb:
name: 'Meta DEB'
needs: [ sofia_build_deb ]
strategy:
matrix:
distro_codename:
- bookworm
- bullseye
- buster
- stretch
platform:
- deb-amd64
- deb-arm
- rpm-amd64

uses: signalwire/actions-template/.github/workflows/ci-libs-metadata-v2.yml@main
- amd64
- arm
uses: s3rj1k/actions-template/.github/workflows/ci-libs-metadata-v2.yml@ci-deb-packages
with:
ARTIFACT_NAME: ${{ matrix.platform }}-artifact
OS_PLATFORM: ${{ matrix.platform }}
ARTIFACT_NAME: deb-${{ matrix.distro_codename }}-${{ matrix.platform }}-artifact
OS_PLATFORM: deb-${{ matrix.platform }}
RUNNER: ubuntu-latest
FILE_PATH_PREFIX: /var/www/sofia-${{ matrix.platform }}/${{github.run_id}}-${{github.run_number}}
FILE_PATH_PREFIX: /var/www/sofia-deb-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}

generate_meta_rpm:
name: 'Meta RPM'
needs: [ sofia_build_rpm ]
strategy:
matrix:
platform:
- amd64
uses: s3rj1k/actions-template/.github/workflows/ci-libs-metadata-v2.yml@ci-deb-packages
with:
ARTIFACT_NAME: rpm-${{ matrix.platform }}-artifact
OS_PLATFORM: rpm-${{ matrix.platform }}
RUNNER: ubuntu-latest
FILE_PATH_PREFIX: /var/www/sofia-rpm-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}

distribute_matrix:
if: github.ref == 'refs/heads/main'
permissions: write-all
name: 'Copy to remote'
needs: [sofia_build_rpm, sofia_build_deb]
needs: [ sofia_build_rpm, sofia_build_deb ]
strategy:
matrix:
os_platform:
- deb-amd64
- deb-arm
- rpm-amd64

uses: signalwire/actions-template/.github/workflows/cd-scp.yml@main
uses: s3rj1k/actions-template/.github/workflows/cd-scp.yml@ci-deb-packages
with:
ARTIFACT_NAME: ${{ matrix.os_platform }}-artifact
TARGET_FOLDER: /var/www/sofia-${{ matrix.os_platform }}/${{github.run_id}}-${{github.run_number}}
TARGET_FOLDER: /var/www/sofia-${{ matrix.os_platform }}/${{ github.run_id }}-${{ github.run_number }}
RUNNER: ubuntu-latest
FILES: '*.tar.gz'
CREATE_DESTINATION_FOLDERS: true
Expand All @@ -86,20 +103,20 @@ jobs:
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}

distribute_meta_deb:
if: github.ref == 'refs/heads/main'
permissions: write-all
name: 'Copy meta to remote'
needs: generate_meta
needs: [ generate_meta_rpm, generate_meta_deb ]
strategy:
matrix:
os:
- deb
platform:
- amd64
- arm

uses: signalwire/actions-template/.github/workflows/cd-libs-metadata.yml@main
uses: s3rj1k/actions-template/.github/workflows/cd-libs-metadata.yml@ci-deb-packages
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{matrix.platform}}-meta
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.platform }}-meta
LIB_NAME: sofia-sip
TARGET_OS: ${{ matrix.os }}
TARGET_PLATFORM: ${{ matrix.platform }}
Expand All @@ -109,6 +126,7 @@ jobs:
GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }}

distribute_meta_rpm:
if: github.ref == 'refs/heads/main'
permissions: write-all
name: 'Copy meta to remote'
needs: generate_meta
Expand All @@ -118,10 +136,9 @@ jobs:
- rpm
platform:
- amd64

uses: signalwire/actions-template/.github/workflows/cd-libs-metadata.yml@main
uses: s3rj1k/actions-template/.github/workflows/cd-libs-metadata.yml@ci-deb-packages
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{matrix.platform}}-meta
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.platform }}-meta
LIB_NAME: sofia-sip
TARGET_OS: ${{ matrix.os }}
TARGET_PLATFORM: ${{ matrix.platform }}
Expand All @@ -131,10 +148,11 @@ jobs:
GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }}

distribute_hash:
if: github.ref == 'refs/heads/main'
permissions: write-all
name: 'Copy hash to remote'
needs: [distribute_meta_deb, distribute_meta_rpm]
uses: signalwire/actions-template/.github/workflows/cd-scp.yml@main
needs: [ distribute_meta_deb, distribute_meta_rpm ]
uses: s3rj1k/actions-template/.github/workflows/cd-scp.yml@ci-deb-packages
strategy:
matrix:
os_platform:
Expand All @@ -144,7 +162,7 @@ jobs:
with:
RUNNER: ubuntu-latest
CREATE_DESTINATION_FOLDERS: false
EXEC_COMMANDS: 'echo "${{github.sha}}" > /var/www/sofia-${{ matrix.os_platform }}/${{github.run_id}}-${{github.run_number}}/hash.txt'
EXEC_COMMANDS: 'echo "${{ github.sha }}" > /var/www/sofia-${{ matrix.os_platform }}/${{ github.run_id }}-${{ github.run_number }}/hash.txt'
secrets:
PROXY_URL: ${{ secrets.PROXY_URL }}
USERNAME: ${{ secrets.USERNAME }}
Expand Down

0 comments on commit 6a71381

Please sign in to comment.