forked from syslog-ng/syslog-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (56 loc) · 1.63 KB
/
upload-packages.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
name: Upload package to Azure/incoming
on:
workflow_call:
inputs:
pkg-type:
required: true
type: string # stable / nightly
distros:
required: false
type: string
default: '[
"debian-testing",
"debian-sid",
"debian-bullseye",
"debian-bookworm",
"ubuntu-focal",
"ubuntu-jammy",
"ubuntu-noble",
"ubuntu-lunar",
"ubuntu-mantic"
]'
secrets:
azure-sas-token:
required: true
jobs:
upload-packages:
name: ${{ matrix.distro }}
runs-on: ubuntu-latest
if: github.repository_owner == 'syslog-ng'
strategy:
matrix:
distro: ${{ fromJson(inputs.distros) }}
fail-fast: false
steps:
- name: Download package artifact
uses: actions/download-artifact@v3
with:
name: package-${{ matrix.distro }}
path: package
- name: Calculate Azure path
run: |
if [[ ! "${{ inputs.pkg-type }}" =~ ^(stable|nightly)$ ]]; then
echo Unexpected input: pkg-type=${{ inputs.pkg-type }}
false
fi
AZURE_PATH="incoming/${{ inputs.pkg-type }}/${{ github.run_id }}"
echo "AZURE_PATH=${AZURE_PATH}" >> ${GITHUB_ENV}
- name: Upload packages to Azure incoming
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob upload-batch \
--sas-token '${{ secrets.azure-sas-token }}' \
--account-name 'syslogngose' \
--source 'package' \
--destination '${{ env.AZURE_PATH }}'