Skip to content

Commit e335de7

Browse files
authored
chore: merge after-release-beta2 into master (#2156)
Merge the `after-release-beta2` branch to `master`.
2 parents 5b8933e + 922ec76 commit e335de7

File tree

99 files changed

+2547
-406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+2547
-406
lines changed

.github/workflows/ci-devel.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI - Devel scripts
2+
3+
on:
4+
push:
5+
paths:
6+
# NOTE: GitHub Actions do not allow using YAML references, the same path
7+
# list is used below for the pull request event. Keep both lists in sync!!
8+
9+
# this file as well
10+
- .github/workflows/ci-devel.yml
11+
# any change in the devel subfolder
12+
- devel/**
13+
# except the Markdown documentation
14+
- "!devel/**.md"
15+
pull_request:
16+
paths:
17+
# NOTE: GitHub Actions do not allow using YAML references, the same path
18+
# list is used above for the push event. Keep both lists in sync!!
19+
20+
# this file as well
21+
- .github/workflows/ci-devel.yml
22+
# any change in the devel subfolder
23+
- devel/**
24+
# except the Markdown documentation
25+
- "!devel/**.md"
26+
27+
# allow running manually
28+
workflow_dispatch:
29+
30+
jobs:
31+
ci_devel:
32+
runs-on: ubuntu-latest
33+
34+
steps:
35+
36+
- name: Git Checkout
37+
uses: actions/checkout@v4
38+
with:
39+
# checkout only the "devel" subdirectory
40+
sparse-checkout: |
41+
devel
42+
43+
- name: Run the tests
44+
run: find devel -type f -exec grep -l -E "^#! *(/usr/|)/bin/(ba|)sh" \{\} \; | xargs -I% bash -c "echo 'Checking %...' && shellcheck %"

.github/workflows/obs-release.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/obs-service-shared.yml

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,24 @@ name: Update OBS Service Package
55
on:
66
workflow_call:
77
secrets:
8-
OBS_USER:
9-
required: true
108
OBS_PASSWORD:
119
required: true
1210

1311
jobs:
1412
update_service:
15-
# do not run in forks which do not set the OBS_PROJECT variable
16-
if: vars.OBS_PROJECT != ''
13+
# do not run in forks which do not set the OBS_PROJECTS and OBS_USER variables,
14+
# or the mapping for the current branch is missing
15+
if: vars.OBS_PROJECTS && fromJson(vars.OBS_PROJECTS)[github.ref_name] && vars.OBS_USER
1716

1817
runs-on: ubuntu-latest
1918

2019
container:
2120
image: registry.opensuse.org/opensuse/tumbleweed:latest
2221

22+
env:
23+
# to avoid Ruby UTF-8 errors (the default is "POSIX")
24+
LC_ALL: en_US.UTF-8
25+
2326
steps:
2427
- name: Configure and refresh repositories
2528
# disable unused repositories to have a faster refresh
@@ -43,33 +46,27 @@ jobs:
4346
# fetch all history, we need to find the latest tag and offset for the version number
4447
fetch-depth: 0
4548

46-
- name: Git Checkout (release tag only)
47-
if: ${{ github.ref_type == 'tag' }}
48-
uses: actions/checkout@v4
49-
5049
- name: Configure git
5150
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
5251

52+
- name: Git Checkout
53+
uses: actions/checkout@v4
54+
with:
55+
# fetch all history with tags, we need to find the latest version tag
56+
fetch-depth: 0
57+
fetch-tags: true
58+
5359
- name: Configure osc
5460
run: .github/workflows/configure_osc.sh
5561
env:
56-
OBS_USER: ${{ secrets.OBS_USER }}
62+
OBS_USER: ${{ vars.OBS_USER }}
5763
OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }}
5864

59-
- name: Commit the rubygem-agama-yast package to ${{ vars.OBS_PROJECT }}
65+
- name: Commit the rubygem-agama-yast package to ${{ fromJson(vars.OBS_PROJECTS)[github.ref_name] }}
6066
run: rake osc:commit
6167
working-directory: ./service
6268
env:
6369
# do not build the package with "osc", it takes long time
6470
# and does not provide much value
6571
SKIP_OSC_BUILD: 1
66-
OBS_PROJECT: ${{ vars.OBS_PROJECT }}
67-
68-
- name: Submit the rubygem-agama-yast package
69-
# only when a tag has been pushed
70-
if: ${{ github.ref_type == 'tag' }}
71-
# the package has been comitted in the previous step, just submit it
72-
run: rake osc:sr:force
73-
working-directory: ./service
74-
env:
75-
OBS_PROJECT: ${{ vars.OBS_PROJECT }}
72+
OBS_PROJECT: ${{ fromJson(vars.OBS_PROJECTS)[github.ref_name] }}

.github/workflows/obs-staging-autoinstallation.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Submit agama-auto
33
on:
44
# runs on pushes targeting the default branch
55
push:
6-
branches:
7-
- master
8-
- release
96
paths:
107
# run only when an autoinstallation source is changed
118
- autoinstallation/**

.github/workflows/obs-staging-live.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
name: Submit agama-installer
22

33
on:
4-
# runs on pushes targeting the default branch
54
push:
6-
branches:
7-
- master
8-
- release
95
paths:
106
# run only when a live ISO source is changed
117
- live/**
@@ -14,9 +10,10 @@ on:
1410
workflow_dispatch:
1511

1612
jobs:
17-
update_staging_package:
18-
# do not run in forks which do not set the OBS_PROJECT variable
19-
if: vars.OBS_PROJECT != ''
13+
update_obs_package:
14+
# do not run in forks which do not set the OBS_PROJECTS variable,
15+
# or the mapping for the current branch is missing
16+
if: vars.OBS_PROJECTS && fromJson(vars.OBS_PROJECTS)[github.ref_name] && vars.OBS_USER
2017

2118
runs-on: ubuntu-latest
2219

@@ -41,11 +38,11 @@ jobs:
4138
- name: Configure osc
4239
run: .github/workflows/configure_osc.sh
4340
env:
44-
OBS_USER: ${{ secrets.OBS_USER }}
41+
OBS_USER: ${{ vars.OBS_USER }}
4542
OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }}
4643

47-
- name: Checkout ${{ vars.OBS_PROJECT }} agama-installer
48-
run: osc co -o dist ${{ vars.OBS_PROJECT }} agama-installer
44+
- name: Checkout ${{ fromJson(vars.OBS_PROJECTS)[github.ref_name] }} agama-installer
45+
run: osc co -o dist ${{ fromJson(vars.OBS_PROJECTS)[github.ref_name] }} agama-installer
4946
working-directory: ./live
5047

5148
- name: Build sources
@@ -60,6 +57,6 @@ jobs:
6057
run: osc diff && osc status
6158
working-directory: ./live/dist
6259

63-
- name: Commit agama-installer to ${{ vars.OBS_PROJECT }}
60+
- name: Commit agama-installer to ${{ fromJson(vars.OBS_PROJECTS)[github.ref_name] }}
6461
run: osc commit -m "Updated to Agama $GITHUB_SHA"
6562
working-directory: ./live/dist

.github/workflows/obs-staging-products.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
name: Submit agama-products
22

33
on:
4-
# runs on pushes targeting the default branch
54
push:
6-
branches:
7-
- master
8-
- release
95
paths:
10-
# run only when a Rust source is changed
6+
# run only when a product source is changed
117
- products.d/**
128

139
# allow running manually

.github/workflows/obs-staging-rust.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
name: Submit agama
22

33
on:
4-
# runs on pushes targeting the default branch
54
push:
6-
branches:
7-
- master
8-
- release
95
paths:
106
# run only when a Rust source is changed
117
- rust/**

.github/workflows/obs-staging-service.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
name: Submit rubygem-agama-yast
22

33
on:
4-
# runs on pushes targeting the default branch
54
push:
6-
branches:
7-
- master
8-
- release
95
paths:
106
# run only when a service source is changed
117
- service/**

.github/workflows/obs-staging-shared.yml

Lines changed: 21 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ name: Update OBS Packages
55
on:
66
workflow_call:
77
secrets:
8-
OBS_USER:
9-
required: true
108
OBS_PASSWORD:
119
required: true
1210

@@ -27,28 +25,17 @@ on:
2725
type: string
2826

2927
jobs:
30-
update_staging_package:
31-
# do not run in forks which do not set the OBS_PROJECT variable,
32-
# for the "release" branch or a git tag use the OBS_PROJECT_RELEASE variable
33-
if: vars.OBS_PROJECT != '' || ((github.ref_name == 'release' || github.ref_type == 'tag') && vars.OBS_PROJECT_RELEASE != '')
28+
update_obs_package:
29+
# do not run in forks which do not set the OBS_PROJECTS and OBS_USER variables,
30+
# or the mapping for the current branch is missing
31+
if: vars.OBS_PROJECTS && fromJson(vars.OBS_PROJECTS)[github.ref_name] && vars.OBS_USER
3432

3533
runs-on: ubuntu-latest
3634

3735
container:
3836
image: registry.opensuse.org/opensuse/tumbleweed:latest
3937

4038
steps:
41-
- name: Select OBS project
42-
id: obs_project
43-
run: |-
44-
if [ "${{ github.ref_name }}" = "release" -o "${{ github.ref_type }}" = "tag" ]; then
45-
echo "OBS_PROJECT=${{ vars.OBS_PROJECT_RELEASE }}" >> "$GITHUB_OUTPUT"
46-
echo "OBS project: ${{ vars.OBS_PROJECT_RELEASE }}"
47-
else
48-
echo "OBS_PROJECT=${{ vars.OBS_PROJECT }}" >> "$GITHUB_OUTPUT"
49-
echo "OBS project: ${{ vars.OBS_PROJECT }}"
50-
fi
51-
5239
- name: Configure and refresh repositories
5340
# disable unused repositories to have a faster refresh
5441
run: zypper modifyrepo -d repo-non-oss repo-openh264 repo-update && zypper ref
@@ -73,54 +60,45 @@ jobs:
7360
- name: Configure osc
7461
run: .github/workflows/configure_osc.sh
7562
env:
76-
OBS_USER: ${{ secrets.OBS_USER }}
63+
OBS_USER: ${{ vars.OBS_USER }}
7764
OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }}
7865

79-
- name: Checkout ${{ steps.obs_project.outputs.OBS_PROJECT }} ${{ inputs.package_name }}
80-
run: osc co ${{ steps.obs_project.outputs.OBS_PROJECT }} ${{ inputs.package_name }}
66+
- name: Checkout ${{ inputs.package_name }} from ${{ fromJson(vars.OBS_PROJECTS)[github.ref_name] }}
67+
run: osc co ${{ fromJson(vars.OBS_PROJECTS)[github.ref_name] }} ${{ inputs.package_name }}
8168

8269
- name: Configure git
8370
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
8471

8572
- name: Update service revision
8673
# only when a tag has been pushed, or "release" branch updated
87-
if: github.ref_type == 'tag' || github.ref_name == 'release'
74+
if: inputs.service_file != ''
8875
run: |-
8976
echo "Updating revision to \"${{ github.ref_name }}\""
90-
sed -i -e 's#<param name="revision">.*</param>#<param name="revision">${{ github.ref_name }}</param>#' _service
91-
working-directory: ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}
77+
sed -i -e 's#<param name="revision">.*</param>#<param name="revision">${{ github.ref_name }}</param>#' ${{ inputs.service_file }}
9278
9379
- name: Copy optional service file
9480
# patch the URL in the file so it works also from forks, forks also by
9581
# default do not inherit the tags so remove the version format option if
9682
# no tag is present
9783
if: inputs.service_file != ''
9884
run: |
99-
sed -e 's#<param name="url">.*</param>#<param name="url">https://github.com/${{ github.repository }}.git</param>#' ${{ inputs.service_file }} > ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}/_service
100-
if [ -z "$(git tag -l)" ]; then sed -i -e 's#<param name="versionformat">.*</param>##' ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}/_service; fi
85+
sed -e 's#<param name="url">.*</param>#<param name="url">https://github.com/${{ github.repository }}.git</param>#' ${{ inputs.service_file }} > ./${{ fromJson(vars.OBS_PROJECTS)[github.ref_name] }}/${{ inputs.package_name }}/_service
86+
if [ -z "$(git tag -l)" ]; then sed -i -e 's#<param name="versionformat">.*</param>##' ./${{ fromJson(vars.OBS_PROJECTS)[github.ref_name] }}/${{ inputs.package_name }}/_service; fi
10187
10288
- name: Run services
103-
run: osc service manualrun
104-
working-directory: ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}
105-
106-
- name: Cleanup
107-
# sometimes the "osc service" run does not cleanup properly all
108-
# downloaded NPM package tarballs and they are accidentally added to the
109-
# OBS package, so delete any TGZ files present
110-
run: rm -vf *.tgz
111-
working-directory: ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}
89+
run: |
90+
osc service manualrun
91+
# sometimes the "osc service" run does not cleanup properly all
92+
# downloaded NPM package tarballs and they are accidentally added to the
93+
# OBS package, so delete any TGZ files present
94+
rm -vf *.tgz
95+
working-directory: ./${{ fromJson(vars.OBS_PROJECTS)[github.ref_name] }}/${{ inputs.package_name }}
11296

11397
- name: Check status
11498
run: osc addremove && osc diff && osc status
115-
working-directory: ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}
99+
working-directory: ./${{ fromJson(vars.OBS_PROJECTS)[github.ref_name] }}/${{ inputs.package_name }}
116100

117-
- name: Commit ${{ inputs.package_name }} to ${{ steps.obs_project.outputs.OBS_PROJECT }}
101+
- name: Commit ${{ inputs.package_name }} to ${{ fromJson(vars.OBS_PROJECTS)[github.ref_name] }}
118102
run: |-
119103
osc commit -m "Updated to $(sed -e '/^version:/!d' -e 's/version: *\(.*\)/\1/' agama.obsinfo) ($(sed -e '/^commit:/!d' -e 's/commit: *\(.*\)/\1/' agama.obsinfo))"
120-
working-directory: ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}
121-
122-
- name: Submit the package
123-
# only when a tag has been pushed
124-
if: github.ref_type == 'tag'
125-
run: osc sr --yes -m "Releasing version ${{ github.ref_name }}"
126-
working-directory: ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}
104+
working-directory: ./${{ fromJson(vars.OBS_PROJECTS)[github.ref_name] }}/${{ inputs.package_name }}

.github/workflows/obs-staging-web.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
name: Submit agama-web-ui
22

33
on:
4-
# runs on pushes targeting the default branch
54
push:
6-
branches:
7-
- master
8-
- release
95
paths:
106
# run only when a web frontend source is changed
117
- web/**

0 commit comments

Comments
 (0)