CI: PostmarketOS: use env instead fo hardcoded vars

Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
Vasiliy Doylov 2025-06-07 02:13:55 +03:00
parent 965a5549f2
commit 6a3435f2bf
Signed by: NekoCWD
GPG key ID: B7BE22D44474A582
6 changed files with 20 additions and 6 deletions

View file

@ -10,16 +10,16 @@ jobs:
runs-on: Pmbootstrap runs-on: Pmbootstrap
steps: steps:
- name: Pull pmbootstrap from mirror - name: Pull pmbootstrap from mirror
run: cd /data/pmbootstrap && git fetch && git reset --hard origin/master run: cd ${{env.PMB_PMBOOTSTRAP}} && git fetch && git reset --hard origin/master
pull-pmaports: pull-pmaports:
name: Update PostamrketOS aports name: Update PostamrketOS aports
runs-on: Pmbootstrap runs-on: Pmbootstrap
steps: steps:
- name: Pull pmaports from mirror - name: Pull pmaports from mirror
run: cd /data/pmaports && git fetch && git reset --hard origin/master run: cd ${{env.PMB_PMAPORTS}} && git fetch && git reset --hard origin/master
pull-aports: pull-aports:
name: Update Alpine aports name: Update Alpine aports
runs-on: Pmbootstrap runs-on: Pmbootstrap
steps: steps:
- name: Pull aports from mirror - name: Pull aports from mirror
run: cd /data/aports && git fetch && git reset --hard origin/master run: cd ${{env.PMB_APORTS}} && git fetch && git reset --hard origin/master

View file

@ -27,5 +27,7 @@ services:
- ./conf/pmb/:/conf - ./conf/pmb/:/conf
- ./pmb/setup:/setup-pmbootstrap - ./pmb/setup:/setup-pmbootstrap
- ./pmb/pmbootstrap:/usr/bin/pmbootstrap - ./pmb/pmbootstrap:/usr/bin/pmbootstrap
- ./pmb/pmbootstrap.conf:/pmbootstrap.conf - ./pmb/pmbootstrap.cfg:/pmbootstrap.cfg
- ./pmb/env:/data/.env
command: "/setup-pmbootstrap" command: "/setup-pmbootstrap"
privileged: true

5
pmb/env Normal file
View file

@ -0,0 +1,5 @@
PMB_DATA="/data"
PMB_PMBOOTSTRAP=$PMB_DATA"/pmbootstrap"
PMB_PMAPORTS=$PMB_DATA"/pmaports"
PMB_APORTS=$PMB_DATA"/aports"
PMB_WORK=$PMB_DATA"/work"

View file

@ -1,2 +1,2 @@
#!/bin/sh #!/bin/sh
exec /data/pmbootstrap/pmbootstrap.py -c /pmbootstrap.cfg -p /data/pmaports -w /data/work -y "$@" exec /data/pmbootstrap/pmbootstrap.py -c /pmbootstrap.cfg --aports /data/pmaports -w /data/work --details-to-stdout --as-root "$@"

View file

@ -1,6 +1,13 @@
#!/bin/sh #!/bin/sh
/setup-runner /setup-runner
apk add python3 losetup cmd:kpartx openssl
git clone https://git.nekocwd.duckdns.org/Mirror/pmbootstrap /data/pmbootstrap || true git clone https://git.nekocwd.duckdns.org/Mirror/pmbootstrap /data/pmbootstrap || true
git clone https://git.nekocwd.duckdns.org/Mirror/pmaports /data/pmaports || true git clone https://git.nekocwd.duckdns.org/Mirror/pmaports /data/pmaports || true
git clone https://git.nekocwd.duckdns.org/Mirror/aports /data/aports || true git clone https://git.nekocwd.duckdns.org/Mirror/aports /data/aports || true
git -C /data/pmaports remote add postmarketos https://gitlab.postmarketos.org/postmarketOS/pmaports.git || true
git -C /data/pmaports fetch postmarketos --depth=1 -f || true
yes '' | pmbootstrap init
pmbootstrap config mirrors.alpine https://mirror.nekocwd.duckdns.org/alpine/
pmbootstrap config mirrors.pmaports https://mirror.nekocwd.duckdns.org/postmarketos/
pmbootstrap config mirrors.systemd https://mirror.nekocwd.duckdns.org/postmarketos/extra-repos/systemd/
/run-runner /run-runner

View file

@ -5,4 +5,4 @@ if [ ! -e /conf/config.yaml ]; then
forgejo-runner generate-config > /conf/config.yaml forgejo-runner generate-config > /conf/config.yaml
forgejo-runner register -c /conf/config.yaml --no-interactive --instance $INSTANCE --labels $LABELS --name $NAME --token $TOKEN forgejo-runner register -c /conf/config.yaml --no-interactive --instance $INSTANCE --labels $LABELS --name $NAME --token $TOKEN
fi fi
apk add nodejs git # For basic checkout action apk add nodejs git curl # For basic checkout action