2024-02-04 08:15:00 +11:00
|
|
|
name: publish packages using Open Build Service
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "master" ]
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish-obs:
|
2024-02-09 10:15:24 +11:00
|
|
|
if: github.repository == 'SnowflakePowered/librashader'
|
2024-02-04 08:15:00 +11:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: fedora:39
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-10-02 15:02:46 +10:00
|
|
|
uses: actions/checkout@v4
|
2024-02-04 08:15:00 +11:00
|
|
|
- name: Install OSC and dependencies
|
|
|
|
env:
|
|
|
|
OBS_CONFIG: ${{ secrets.OBS_CONFIG }}
|
|
|
|
run: |
|
|
|
|
sudo dnf install -y osc obs-service-obs_scm obs-service-cargo_vendor cargo python3-zstandard
|
|
|
|
mkdir -p ~/.config/osc
|
|
|
|
echo "$OBS_CONFIG" > ~/.config/osc/oscrc
|
|
|
|
- name: Checkout Open Build Service repository
|
|
|
|
run: |
|
|
|
|
osc co home:chyyran:librashader/librashader
|
|
|
|
- name: Copy spec from repository
|
|
|
|
run: |
|
|
|
|
cp -r ./pkg/obs/ home:chyyran:librashader/librashader/
|
|
|
|
sed -r -i 's/(<param name="revision">)(.+)(<\/param>)/<param name="revision">${{ github.sha }}<\/param>/g' home:chyyran:librashader/librashader/_service
|
|
|
|
- name: Vendor sources for Open Build Service
|
|
|
|
run: |
|
|
|
|
cd home:chyyran:librashader/librashader/
|
2024-02-05 10:06:39 +11:00
|
|
|
rm *.obscpio
|
2024-02-04 08:15:00 +11:00
|
|
|
osc service mr
|
|
|
|
- name: Commit source artifacts to Open Build Service
|
|
|
|
run: |
|
|
|
|
cd home:chyyran:librashader/librashader/
|
|
|
|
osc ar
|
2024-02-05 10:05:58 +11:00
|
|
|
osc commit -f -m "git-rev ${{ github.sha }}"
|