Skip to content

Commit

Permalink
Merge pull request #1000 from BoukeHaarsma23/build-system-updates
Browse files Browse the repository at this point in the history
Build system updates
  • Loading branch information
NeroReflex authored Aug 25, 2024
2 parents 9544020 + 6083094 commit 4c2178c
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 30 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ jobs:
- run: |
sudo prlimit --pid $$ --nofile=500000:500000
ulimit -a
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
push: true
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/build-system-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,21 @@ jobs:
sudo rm -rf /opt/hostedtoolcache
sudo rm -rf /opt/az
df -h
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: AUR-packages
pattern: AUR-packages*
merge-multiple: true
path: aur-pkgs/
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: Packages
pattern: Packages*
merge-multiple: true
path: pkgs/
- name: Build system image
id: build_image
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ jobs:
- run: |
sudo prlimit --pid $$ --nofile=500000:500000
ulimit -a
- uses: actions/checkout@v3
- 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
Expand All @@ -59,21 +58,22 @@ jobs:
- run: |
sudo prlimit --pid $$ --nofile=500000:500000
ulimit -a
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
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@v3
uses: actions/upload-artifact@v4
with:
name: AUR-packages
name: AUR-packages-${{ matrix.package }}
path: aur-pkgs/*.pkg.tar*
compression-level: 0

pkgbuild:
needs:
Expand All @@ -95,21 +95,22 @@ jobs:
- run: |
sudo prlimit --pid $$ --nofile=500000:500000
ulimit -a
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
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@v3
uses: actions/upload-artifact@v4
with:
name: Packages
name: Packages-${{ hashFiles(format('{0}/PKGBUILD', matrix.package)) }}
path: pkgs/*.pkg.tar*
compression-level: 0

build:
needs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- run: |
sudo prlimit --pid $$ --nofile=500000:500000
ulimit -a
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Read version
id: set-version
run: |
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- run: |
sudo prlimit --pid $$ --nofile=500000:500000
ulimit -a
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- id: set-aur-pkgs
Expand Down Expand Up @@ -61,23 +61,24 @@ jobs:
- run: |
sudo prlimit --pid $$ --nofile=500000:500000
ulimit -a
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
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-package.sh ${{ steps.meta.outputs.tags }} ${{ matrix.package }}
- name: Upload Package Archives
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: AUR-packages
name: AUR-packages-${{ hashFiles(format('{0}/PKGBUILD', matrix.package)) }}
path: aur-pkgs/*.pkg.tar*
compression-level: 0

pkgbuild:
needs:
Expand All @@ -99,21 +100,22 @@ jobs:
- run: |
sudo prlimit --pid $$ --nofile=500000:500000
ulimit -a
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
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@v3
uses: actions/upload-artifact@v4
with:
name: Packages
name: Packages-${{ hashFiles(format('{0}/PKGBUILD', matrix.package)) }}
path: pkgs/*.pkg.tar*
compression-level: 0

build:
needs:
Expand Down

0 comments on commit 4c2178c

Please sign in to comment.