Add project config to git
All checks were successful
OBS SCM/CI Workflow Integration started

Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
This commit is contained in:
2025-02-12 16:53:19 +01:00
committed by Nicolas Belouin
parent 9d97e8a56d
commit c86d724e92
2 changed files with 143 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
name: Synchronize Project Config
on:
push:
branches:
- "main"
- "3.*"
paths:
- "_config"
jobs:
sync-prjconf:
runs-on: tumbleweed
steps:
- run: |
mkdir -p ~/.config/osc
cat >~/.config/osc <<EOF
[general]
apiurl = https://api.opensuse.org
[https://api.opensuse.org]
user=${{OBS_USERNAME}}
pass=${{OBS_PASSWORD}}
EOF
# Waiting on PR to get merged for support in upstream action/checkout action
- uses: 'https://github.com/yangskyboxlabs/action-checkout@sha256'
with:
object-format: 'sha256'
- run: |
PROJECT="$(grep PROJECT .obs/common.py | sed 's/PROJECT = "\(.*\)"/\1/')"
if [ "$(osc meta prjconf "${PROJECT}" | sha256sum)" = "$(cat _config | sha256sum)" ] ; then
osc meta prjconf -F _config
fi