-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (47 loc) · 1.56 KB
/
ci.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
name: "Create Zoom RPM S3 repository"
on: [push, pull_request]
jobs:
sync:
name: "Build and publish RPM"
runs-on: ubuntu-latest
env:
YUM_REPODIR: "/github/home/zoomrepo"
strategy:
matrix:
os_version: [ 39 ]
os_type: [ fedora ]
arch: [ x86_64 ]
fail-fast: false
container:
image: ${{ matrix.os_type }}:${{ matrix.os_version }}
steps:
- uses: actions/checkout@v4
with:
path: sources
- name: set version
run: |
echo "ZOOM_VERSION=$(cat sources/VERSION)" >> $GITHUB_ENV
- name: install deps
run: |
dnf -y install python-pip createrepo && \
pip install awscli --upgrade
- name: create repo dir
run: |
mkdir -p $YUM_REPODIR/${{ matrix.arch }}
- name: download rpm
run: |
curl -s --fail -L -o $YUM_REPODIR/${{ matrix.arch }}/zoom-${ZOOM_VERSION}-1.${{ matrix.arch }}.rpm \
https://zoom.us/client/${ZOOM_VERSION}/zoom_${{ matrix.arch }}.rpm
- name: create repo
run: |
cd $YUM_REPODIR && \
createrepo --deltas ${{ matrix.arch }}
- name: sync repo
if: github.ref == 'refs/heads/master'
env:
S3_BUCKET: ${{ secrets.S3_BUCKET }}
S3_REGION: ${{ secrets.S3_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 sync --quiet --acl public-read --delete --region $S3_REGION $YUM_REPODIR s3://$S3_BUCKET/