Merge pull request #1016 from NeroReflex/move_udev_rules #912
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: System image build | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build-docker-image: | |
name: Build and publish docker container | |
uses: ./.github/workflows/build-builder.yml | |
list-pkgbuilds: | |
name: List Packages | |
runs-on: ubuntu-latest | |
outputs: | |
aur-pkgs: ${{ steps.set-aur-pkgs.outputs.matrix }} | |
pkgs: ${{ steps.set-pkgs.outputs.matrix }} | |
steps: | |
- name: Set 8.8.8.8 as dns server | |
run: | | |
sudo sed -i 's/#DNS=/DNS=8.8.8.8 8.8.4.4/g' /etc/systemd/resolved.conf | |
sudo systemctl daemon-reload | |
sudo systemctl restart systemd-networkd | |
sudo systemctl restart systemd-resolved | |
- run: | | |
sudo prlimit --pid $$ --nofile=500000:500000 | |
ulimit -a | |
- uses: actions/checkout@v4 | |
- id: set-aur-pkgs | |
run: source ./manifest ; echo "matrix=$(echo ${AUR_PACKAGES} | jq -R -s -c 'split(" ")')" >> $GITHUB_OUTPUT | |
shell: bash | |
- id: set-pkgs | |
run: echo "matrix=$(ls -d pkgs/*/ | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT | |
shell: bash | |
aur-pkgbuild: | |
needs: | |
- build-docker-image | |
- list-pkgbuilds | |
name: Build AUR package | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
package: ${{ fromJson(needs.list-pkgbuilds.outputs.aur-pkgs) }} | |
steps: | |
- name: Set 8.8.8.8 as dns server | |
run: | | |
sudo sed -i 's/#DNS=/DNS=8.8.8.8 8.8.4.4/g' /etc/systemd/resolved.conf | |
sudo systemctl daemon-reload | |
sudo systemctl restart systemd-networkd | |
sudo systemctl restart systemd-resolved | |
- run: | | |
sudo prlimit --pid $$ --nofile=500000:500000 | |
ulimit -a | |
- uses: actions/checkout@v4 | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: Build packages | |
run: | | |
docker pull ${{ steps.meta.outputs.tags }} | |
docker run --rm -v $(pwd):/workdir --entrypoint=/workdir/aur-pkgs/build-aur-package.sh ${{ steps.meta.outputs.tags }} ${{ matrix.package }} | |
- name: Upload Package Archives | |
uses: actions/upload-artifact@v4 | |
with: | |
name: AUR-packages-${{ matrix.package }} | |
path: aur-pkgs/*.pkg.tar* | |
compression-level: 0 | |
pkgbuild: | |
needs: | |
- build-docker-image | |
- list-pkgbuilds | |
name: Build package | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
package: ${{ fromJson(needs.list-pkgbuilds.outputs.pkgs) }} | |
steps: | |
- name: Set 8.8.8.8 as dns server | |
run: | | |
sudo sed -i 's/#DNS=/DNS=8.8.8.8 8.8.4.4/g' /etc/systemd/resolved.conf | |
sudo systemctl daemon-reload | |
sudo systemctl restart systemd-networkd | |
sudo systemctl restart systemd-resolved | |
- run: | | |
sudo prlimit --pid $$ --nofile=500000:500000 | |
ulimit -a | |
- uses: actions/checkout@v4 | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: Build packages | |
run: | | |
docker pull ${{ steps.meta.outputs.tags }} | |
docker run --rm -v $(pwd):/workdir --entrypoint=/workdir/pkgs/build-package.sh ${{ steps.meta.outputs.tags }} ${{ matrix.package }} | |
- name: Upload Package Archives | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Packages-${{ hashFiles(format('{0}/PKGBUILD', matrix.package)) }} | |
path: pkgs/*.pkg.tar* | |
compression-level: 0 | |
build: | |
needs: | |
- build-docker-image | |
- aur-pkgbuild | |
- pkgbuild | |
name: Build ChimeraOS UNSTABLE image | |
uses: ./.github/workflows/build-system-image.yml | |
with: | |
postfix: "[UNSTABLE]" |