forgejo-ci: add test build workflow
Some checks failed
/ build-test (pull_request) Failing after 19s
Some checks failed
/ build-test (pull_request) Failing after 19s
This commit is contained in:
parent
e358235d30
commit
2eef3378c3
1 changed files with 40 additions and 0 deletions
40
.forgejo/workflows/test-build.yaml
Normal file
40
.forgejo/workflows/test-build.yaml
Normal file
|
@ -0,0 +1,40 @@
|
|||
on:
|
||||
pull_request:
|
||||
types: [ assigned, opened, synchronize, reopened ]
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
runs-on: x86_64
|
||||
container:
|
||||
image: alpine:3.20
|
||||
env:
|
||||
CI_PROJECT_DIR: ${{ github.workspace }}
|
||||
CI_DEBUG_BUILD: ${{ runner.debug }}
|
||||
CI_MERGE_REQUEST_PROJECT_URL: ${{ github.server_url }}/${{ github.repository }}
|
||||
CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${{ github.base_ref }}
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: |
|
||||
doas apk add rpm wget losetup coreutils eudev e2fsprogs xen
|
||||
cd /etc/apk/keys
|
||||
doas 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 $CI_PROJECT_DIR 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
|
||||
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: packages
|
Loading…
Reference in a new issue