Set Opencast version on develop to 17 #17
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: Build Repository RPMs | |
env: | |
package: opencast-repository | |
arch: noarch | |
repo: release | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- develop | |
- 'r/*' | |
paths: | |
- oc.version | |
- .github/workflows/build-repository-rpms.yml | |
- rpmbuild/SOURCES/opencast.repo | |
- rpmbuild/SOURCES/opencast-testing.repo | |
- rpmbuild/SPECS/opencast-repository.spec | |
jobs: | |
build: | |
strategy: | |
matrix: | |
osversion: | |
- 8 | |
- 9 | |
outputs: | |
oc-version: ${{ steps.version.outputs.version }} | |
arch: ${{ env.arch}} | |
repo: ${{ env.repo }} | |
name: build (el${{ matrix.osversion }}) | |
runs-on: ubuntu-latest | |
container: | |
image: docker.io/lkiesow/opencast-rpmbuild:el${{ matrix.osversion }}-oc16 | |
steps: | |
- uses: actions/checkout@v3 | |
- id: version | |
run: echo "version=$(cat oc.version)" >> $GITHUB_OUTPUT | |
- name: mimic rpmdev-setuptree | |
working-directory: rpmbuild | |
run: | | |
ln -s "$(pwd)" ~/rpmbuild | |
- name: define rpm version | |
run: | | |
echo "%ocversion $(cat oc.version)" >> ~/.rpmmacros | |
- name: build rpm | |
working-directory: rpmbuild/SPECS | |
run: | | |
rpmbuild -ba ${{ env.package }}.spec | |
- name: list rpms | |
working-directory: rpmbuild/RPMS/${{ env.arch }} | |
run: | | |
du -hs ./*.rpm | |
- name: prepare gpg | |
env: | |
GPG_KEY: ${{ secrets.GPG_KEY_OC16 }} | |
run: | | |
echo "${GPG_KEY}" | gpg --import | |
echo '%_gpg_name [email protected]' >> ~/.rpmmacros | |
- name: sign rpms | |
working-directory: rpmbuild/RPMS/${{ env.arch }} | |
run: | | |
rpmsign --addsign *.rpm | |
- name: configure s3cmd | |
env: | |
S3_HOST: ${{ secrets.S3_HOST }} | |
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} | |
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }} | |
run: | | |
echo "host_base = ${S3_HOST}" > "$HOME/.s3cfg" | |
echo "host_bucket = ${S3_HOST}" >> "$HOME/.s3cfg" | |
echo "bucket_location = us-east-1" >> "$HOME/.s3cfg" | |
echo "use_https = True" >> "$HOME/.s3cfg" | |
echo "access_key = ${S3_ACCESS_KEY}" >> "$HOME/.s3cfg" | |
echo "secret_key = ${S3_SECRET_KEY}" >> "$HOME/.s3cfg" | |
echo "signature_v2 = False" >> "$HOME/.s3cfg" | |
- name: publish repository rpm | |
working-directory: rpmbuild/RPMS/${{ env.arch }} | |
run: | | |
s3cmd put -P *.rpm "s3://opencast-pkg/rpms/${{ env.repo }}/el/${{ matrix.osversion }}/oc-${{ steps.version.outputs.version }}/${{ env.arch }}/" | |
createrepo: | |
uses: opencast/opencast-rpmbuild/.github/workflows/createrepo.yml@develop | |
needs: build | |
strategy: | |
matrix: | |
os-version: | |
- 7 | |
- 8 | |
- 9 | |
with: | |
oc-version: ${{ needs.build.outputs.oc-version }} | |
os-version: ${{ matrix.os-version }} | |
arch: ${{ needs.build.outputs.arch }} | |
repo: ${{ needs.build.outputs.repo }} | |
secrets: | |
S3_HOST: ${{ secrets.S3_HOST }} | |
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} | |
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }} |