# this is a shared workflow, not called as a top level workflow name: Update OBS Service Package on: workflow_call: secrets: OBS_USER: required: true OBS_PASSWORD: required: true jobs: update_service: # do not run in forks which do not set the OBS_PROJECT variable if: vars.OBS_PROJECT != '' runs-on: ubuntu-latest container: image: registry.opensuse.org/opensuse/tumbleweed:latest steps: - name: Configure and refresh repositories # disable unused repositories to have a faster refresh run: zypper modifyrepo -d repo-non-oss repo-openh264 repo-update && zypper ref - name: Install tools run: zypper --non-interactive install --no-recommends bzip2 diffutils git obs-service-format_spec_file osc ruby 'rubygem(gem2rpm)' 'rubygem(yast-rake)' - name: Git Checkout (full history) if: ${{ github.ref_type != 'tag' }} uses: actions/checkout@v4 with: # fetch all history, we need to find the latest tag and offset for the version number fetch-depth: 0 - name: Git Checkout (release tag only) if: ${{ github.ref_type == 'tag' }} uses: actions/checkout@v4 - name: Configure git run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Configure osc run: .github/workflows/configure_osc.sh env: OBS_USER: ${{ secrets.OBS_USER }} OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }} - name: Commit the rubygem-agama-yast package to ${{ vars.OBS_PROJECT }} run: rake osc:commit working-directory: ./service env: # do not build the package with "osc", it takes long time # and does not provide much value SKIP_OSC_BUILD: 1 OBS_PROJECT: ${{ vars.OBS_PROJECT }} - name: Submit the rubygem-agama-yast package # only when a tag has been pushed if: ${{ github.ref_type == 'tag' }} # the package has been comitted in the previous step, just submit it run: rake osc:sr:force working-directory: ./service env: OBS_PROJECT: ${{ vars.OBS_PROJECT }}