Update documentation about how to create a release (#6320) #1
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: RPMs » Create Repository | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- develop | |
jobs: | |
build: | |
strategy: | |
matrix: | |
arch: | |
- noarch | |
- x86_64 | |
el: | |
- 8 | |
- 9 | |
stage: | |
- testing | |
- release | |
name: create repo (el${{ matrix.el }}/${{ matrix.stage }}/${{ matrix.arch }}) | |
runs-on: ubuntu-latest | |
if: github.repository == 'opencast/opencast' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install s3cmd, xpath and createrepo | |
run: | | |
set -eu | |
sudo apt update -q | |
sudo apt install -y -q s3cmd libxml-xpath-perl createrepo-c | |
- name: Get the version | |
id: get_version | |
run: | | |
xpath -e '/project/version/text()' pom.xml | sed 's/^\([0-9]*\)-SNAPSHOT$/::set-output name=VERSION::\1/' | |
- name: Configure s3cmd | |
uses: lkiesow/configure-s3cmd@v1 | |
with: | |
host: ${{ secrets.S3_HOST }} | |
access_key: ${{ secrets.S3_ACCESS_KEY }} | |
secret_key: ${{ secrets.S3_SECRET_KEY }} | |
- name: Check/create new repository | |
env: | |
S3PATH: opencast-pkg/rpms/${{ matrix.stage }}/el/${{ matrix.el }}/oc-${{ steps.get_version.outputs.VERSION }}/${{ matrix.arch }} | |
run: | | |
set -eux | |
if ! s3cmd info s3://${S3PATH}/repodata/repomd.xml | |
then | |
mkdir ${{ matrix.arch }} | |
createrepo_c ${{ matrix.arch }} | |
cd ${{ matrix.arch }} | |
s3cmd put -P --recursive repodata s3://${S3PATH}/ | |
fi |