Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 69 additions & 13 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
pull_request:
push:
branches:
- release
- master
paths:
- "**"
Expand Down Expand Up @@ -38,40 +37,97 @@ jobs:
runner: ubuntu-latest
- name: arm64v8
runner: ubuntu-latest
# exclude:
# - version: bookworm
# platform:
# name: arm32v7
with:
RUNNER: ${{ matrix.platform.runner }}
ARTIFACTS_PATTERN: '.*\.(deb)$'
DOCKERFILE: .github/docker/${{ matrix.os }}/${{ matrix.version }}/${{ matrix.platform.name }}/Dockerfile
MAINTAINER: 'Andrey Volk <andrey@signalwire.com>'
META_FILE_PATH_PREFIX: /var/www/libsilk/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}
META_FILE_PATH_PREFIX: /var/www/libsilk/public/unstable/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}
PLATFORM: ${{ matrix.platform.name }}
# REPO_DOMAIN: freeswitch.signalwire.com
TARGET_ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-artifact
UPLOAD_BUILD_ARTIFACTS: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }}
TARGET_ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-public-unstable-artifact
UPLOAD_BUILD_ARTIFACTS: ${{ github.event_name != 'pull_request' }}
secrets:
GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }}
HOSTNAME: ${{ secrets.HOSTNAME }}
PROXY_URL: ${{ secrets.PROXY_URL }}
USERNAME: ${{ secrets.USERNAME }}
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}
# REPO_USERNAME: 'signalwire'
# REPO_PASSWORD: ${{ secrets.REPOTOKEN }}

deb-mirror:
name: 'DEB-MIRROR'
if: ${{ github.event_name != 'pull_request' }}
needs:
- deb
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
strategy:
# max-parallel: 1
fail-fast: false
matrix:
os:
- debian
version:
- trixie
- bookworm
- bullseye
platform:
- name: amd64
runner: ubuntu-latest
- name: arm32v7
runner: ubuntu-latest
- name: arm64v8
runner: ubuntu-latest
release:
- release
- unstable
steps:
- name: Checkout reusable actions
uses: actions/checkout@v4
with:
repository: signalwire/actions-template
ref: main
fetch-depth: 1
path: actions
sparse-checkout: |
.github/actions/teleport-local-copy/action.yml
sparse-checkout-cone-mode: false

- name: Mirror artifacts on remote server behind Teleport (public)
uses: ./actions/.github/actions/teleport-local-copy
with:
SRC: '/var/www/libsilk/public/unstable/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}/${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-public-unstable-artifact.tar.gz'
DST: '/var/www/libsilk/public/${{ matrix.release }}/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}/${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-public-${{ matrix.release }}-artifact.tar.gz'
env:
HOSTNAME: ${{ secrets.HOSTNAME }}
PROXY_URL: ${{ secrets.PROXY_URL }}
TOKEN: ${{ secrets.TELEPORT_TOKEN }}
USERNAME: ${{ secrets.USERNAME }}

- name: Mirror artifacts on remote server behind Teleport (fsa)
uses: ./actions/.github/actions/teleport-local-copy
with:
SRC: '/var/www/libsilk/public/unstable/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}/${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-public-unstable-artifact.tar.gz'
DST: '/var/www/libsilk/fsa/${{ matrix.release }}/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}/${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-fsa-${{ matrix.release }}-artifact.tar.gz'
env:
HOSTNAME: ${{ secrets.HOSTNAME }}
PROXY_URL: ${{ secrets.PROXY_URL }}
TOKEN: ${{ secrets.TELEPORT_TOKEN }}
USERNAME: ${{ secrets.USERNAME }}

meta:
name: 'Publish build data to meta-repo'
if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }}
if: ${{ github.event_name != 'pull_request' }}
needs:
- deb
- deb-mirror
permissions:
id-token: write
contents: read
uses: signalwire/actions-template/.github/workflows/meta-repo-content.yml@main
with:
META_CONTENT: '/var/www/libsilk/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}'
META_CONTENT: '/var/www/libsilk/{fsa,public}/{release,unstable}/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}'
META_REPO: signalwire/bamboo_gha_trigger
META_REPO_BRANCH: trigger/libsilk/${{ github.ref_name }}
secrets:
Expand Down