sed VERSION, QUBES_REL and DIST from workflow
This commit is contained in:
parent
fae823d116
commit
680bc16110
4 changed files with 95 additions and 0 deletions
|
@ -8,6 +8,9 @@ jobs:
|
||||||
runs-on: x86_64
|
runs-on: x86_64
|
||||||
container:
|
container:
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
|
env:
|
||||||
|
QUBES_REL: r4.2
|
||||||
|
DIST: alpine320
|
||||||
steps:
|
steps:
|
||||||
- name: Environment setup
|
- name: Environment setup
|
||||||
run: |
|
run: |
|
||||||
|
@ -27,6 +30,8 @@ jobs:
|
||||||
git clone https://github.com/QubesOS/qubes-linux-template-builder qubes-builder/qubes-src/linux-template-builder
|
git clone https://github.com/QubesOS/qubes-linux-template-builder qubes-builder/qubes-src/linux-template-builder
|
||||||
patch -d qubes-builder/qubes-src/linux-template-builder -p1 -i $GITHUB_WORKSPACE/.forgejo/patches/linux-template-builder_use-fuse.patch
|
patch -d qubes-builder/qubes-src/linux-template-builder -p1 -i $GITHUB_WORKSPACE/.forgejo/patches/linux-template-builder_use-fuse.patch
|
||||||
echo "%define _arch x86_64" >> qubes-builder/qubes-src/linux-template-builder/templates.spec
|
echo "%define _arch x86_64" >> qubes-builder/qubes-src/linux-template-builder/templates.spec
|
||||||
|
echo "4.2.0" > qubes-builder/qubes-src/linux-template-builder/version
|
||||||
|
sed "s|DISTS_VM :.*|DISTS_VM := $DIST|" -i ./qubes-builder/builder.conf
|
||||||
cd qubes-builder
|
cd qubes-builder
|
||||||
make linux-template-builder
|
make linux-template-builder
|
||||||
cp qubes-src/linux-template-builder/rpm/noarch/qubes-template-*.rpm $GITHUB_WORKSPACE/.
|
cp qubes-src/linux-template-builder/rpm/noarch/qubes-template-*.rpm $GITHUB_WORKSPACE/.
|
||||||
|
|
73
.forgejo/workflows/release-build.yaml.orig
Normal file
73
.forgejo/workflows/release-build.yaml.orig
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'alpine*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release-build:
|
||||||
|
runs-on: x86_64
|
||||||
|
container:
|
||||||
|
image: alpine:latest
|
||||||
|
steps:
|
||||||
|
- name: Environment setup
|
||||||
|
run: |
|
||||||
|
apk add rpm wget coreutils eudev e2fsprogs xen doas sudo curl nodejs git alpine-sdk fuse2fs patch findutils grep
|
||||||
|
cd /etc/apk/keys
|
||||||
|
curl -JO https://ayakael.net/api/packages/forge/alpine/key
|
||||||
|
- name: Repo pull
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 500
|
||||||
|
- name: RPM build
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/QubesOS/qubes-builder
|
||||||
|
mkdir qubes-builder/qubes-src
|
||||||
|
ln -s $GITHUB_WORKSPACE qubes-builder/qubes-src/builder-alpine
|
||||||
|
cp builder.conf qubes-builder/.
|
||||||
|
git clone https://github.com/QubesOS/qubes-linux-template-builder qubes-builder/qubes-src/linux-template-builder
|
||||||
|
patch -d qubes-builder/qubes-src/linux-template-builder -p1 -i $GITHUB_WORKSPACE/.forgejo/patches/linux-template-builder_use-fuse.patch
|
||||||
|
echo "%define _arch x86_64" >> qubes-builder/qubes-src/linux-template-builder/templates.spec
|
||||||
|
cd qubes-builder
|
||||||
|
make linux-template-builder
|
||||||
|
cp qubes-src/linux-template-builder/rpm/noarch/qubes-template-*.rpm $GITHUB_WORKSPACE/.
|
||||||
|
- name: Package upload
|
||||||
|
uses: forgejo/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: package
|
||||||
|
path: qubes-template-*.rpm
|
||||||
|
release-deploy:
|
||||||
|
needs: [release-build]
|
||||||
|
runs-on: x86_64
|
||||||
|
container:
|
||||||
|
image: alpine:latest
|
||||||
|
env:
|
||||||
|
CI_RPM_REPO: 'https://ayakael.net/api/packages/forge/rpm'
|
||||||
|
FORGE_REPO_TOKEN: ${{ secrets.FORGE_REPO_TOKEN }}
|
||||||
|
FORGE_REPO_USER: ${{ vars.FORGE_REPO_USER }}
|
||||||
|
steps:
|
||||||
|
- name: Setting up environment
|
||||||
|
run: apk add nodejs curl findutils git gawk
|
||||||
|
- name: Repo pull
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Package download
|
||||||
|
uses: forgejo/download-artifact@v3
|
||||||
|
- name: Package deployment
|
||||||
|
run: ${{ github.workspace }}/.forgejo/bin/deploy.sh
|
||||||
|
release-create:
|
||||||
|
needs: [release-build]
|
||||||
|
runs-on: x86_64
|
||||||
|
container:
|
||||||
|
image: ubuntu:latest
|
||||||
|
steps:
|
||||||
|
- name: Package download
|
||||||
|
uses: forgejo/download-artifact@v3
|
||||||
|
- name: Release creation
|
||||||
|
uses: actions/forgejo-release@v2.3.1
|
||||||
|
with:
|
||||||
|
direction: upload
|
||||||
|
url: https://api.ayakael.net
|
||||||
|
repo: ayakael/qubes-builder-alpine
|
||||||
|
token: "${{ secrets.FORGE_REPO_TOKEN }}"
|
||||||
|
release-dir: ./package
|
||||||
|
release-notes: "For download of template through DNF, please go to https://ayakael.net/forge/-/packages/rpm/qubes-template-alpine320"
|
||||||
|
|
12
.forgejo/workflows/release-build.yaml.rej
Normal file
12
.forgejo/workflows/release-build.yaml.rej
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
--- .forgejo/workflows/release-build.yaml
|
||||||
|
+++ .forgejo/workflows/release-build.yaml
|
||||||
|
@@ -7,6 +7,9 @@ jobs:
|
||||||
|
runs-on: x86_64
|
||||||
|
container:
|
||||||
|
image: alpine:3.20
|
||||||
|
+ env:
|
||||||
|
+ QUBES_REL: r4.2
|
||||||
|
+ DIST: alpine320
|
||||||
|
steps:
|
||||||
|
- name: Environment setup
|
||||||
|
run: |
|
|
@ -7,6 +7,9 @@ jobs:
|
||||||
runs-on: x86_64
|
runs-on: x86_64
|
||||||
container:
|
container:
|
||||||
image: alpine:3.20
|
image: alpine:3.20
|
||||||
|
env:
|
||||||
|
QUBES_REL: r4.2
|
||||||
|
DIST: alpine320
|
||||||
steps:
|
steps:
|
||||||
- name: Environment setup
|
- name: Environment setup
|
||||||
run: |
|
run: |
|
||||||
|
@ -26,6 +29,8 @@ jobs:
|
||||||
git clone https://github.com/QubesOS/qubes-linux-template-builder qubes-builder/qubes-src/linux-template-builder
|
git clone https://github.com/QubesOS/qubes-linux-template-builder qubes-builder/qubes-src/linux-template-builder
|
||||||
patch -d qubes-builder/qubes-src/linux-template-builder -p1 -i $GITHUB_WORKSPACE/.forgejo/patches/linux-template-builder_use-fuse.patch
|
patch -d qubes-builder/qubes-src/linux-template-builder -p1 -i $GITHUB_WORKSPACE/.forgejo/patches/linux-template-builder_use-fuse.patch
|
||||||
echo "%define _arch x86_64" >> qubes-builder/qubes-src/linux-template-builder/templates.spec
|
echo "%define _arch x86_64" >> qubes-builder/qubes-src/linux-template-builder/templates.spec
|
||||||
|
echo "4.2.0" > qubes-builder/qubes-src/linux-template-builder/version
|
||||||
|
sed "s|DISTS_VM :.*|DISTS_VM := $DIST|" -i ./qubes-builder/builder.conf
|
||||||
cd qubes-builder
|
cd qubes-builder
|
||||||
make linux-template-builder
|
make linux-template-builder
|
||||||
cp qubes-src/linux-template-builder/rpm/noarch/qubes-template-*.rpm $GITHUB_WORKSPACE/.
|
cp qubes-src/linux-template-builder/rpm/noarch/qubes-template-*.rpm $GITHUB_WORKSPACE/.
|
||||||
|
|
Loading…
Reference in a new issue