-
Notifications
You must be signed in to change notification settings - Fork 57
132 lines (125 loc) · 4.66 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Build and Distribute
on:
pull_request:
push:
branches:
- release
- master
paths:
- "**"
workflow_dispatch:
concurrency:
group: ${{ github.head_ref || github.ref }}
jobs:
deb:
name: 'DEB'
permissions:
id-token: write
contents: read
uses: signalwire/actions-template/.github/workflows/cicd-docker-build-and-distribute.yml@main
strategy:
# max-parallel: 1
fail-fast: false
matrix:
os:
- debian
version:
- bookworm
- bullseye
platform:
- name: amd64
runner: ubuntu-latest
- name: arm32v7
runner: ubuntu-latest
- name: arm64v8
runner: ubuntu-latest
with:
RUNNER: ${{ matrix.platform.runner }}
ARTIFACTS_PATTERN: '.*\.(deb)$'
DOCKERFILE: .github/docker/${{ matrix.os }}/${{ matrix.version }}/${{ matrix.platform.name }}/Dockerfile
MAINTAINER: 'Andrey Volk <[email protected]>'
META_FILE_PATH_PREFIX: /var/www/libks/public/unstable/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}
PLATFORM: ${{ matrix.platform.name }}
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 }}
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:
- 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/libks/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/libks/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/libks/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/libks/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' }}
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/libks/{fsa,public}/{release,unstable}/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}'
META_REPO: signalwire/bamboo_gha_trigger
META_REPO_BRANCH: trigger/libks/${{ github.ref_name }}
secrets:
GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }}