This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: [ 36 ] | |
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/ |