Use pi-hole/ftl-build:ftl-build-buildx containers

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-06-04 13:08:05 +02:00
parent af4ce5cbba
commit d9c09b66f0
3 changed files with 63 additions and 25 deletions
+27 -25
View File
@@ -51,7 +51,6 @@ jobs:
build:
runs-on: ubuntu-latest
needs: smoke-tests
container: ghcr.io/pi-hole/ftl-build:v2.0
strategy:
fail-fast: false
matrix:
@@ -61,13 +60,13 @@ jobs:
- platform: linux/386
bin_name: pihole-FTL-386
- platform: linux/arm/v6
bin_name: pi-hole-FTL-armv6
bin_name: pihole-FTL-armv6
- platform: linux/arm/v7
bin_name: pi-hole-FTL-armv7
bin_name: pihole-FTL-armv7
- platform: linux/arm64/v8
bin_name: pi-hole-FTL-arm64
bin_name: pihole-FTL-arm64
- platform: linux/riscv64
bin_name: pi-hole-FTL-riscv64
bin_name: pihole-FTL-riscv64
env:
CI_ARCH: ${{ matrix.platform }}
@@ -78,15 +77,15 @@ jobs:
-
name: Checkout code
uses: actions/checkout@v3.5.2
-
name: "Fix ownership of repository"
run: chown -R root .
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v2.5.0
-
name: Build and push
uses: docker/build-push-action@v3
name: Print directory contents
run: ls -l
-
name: Build and test FTL in ftl-build container (QEMU)
uses: docker/build-push-action@v4.0.0
with:
# tags: ghcr.io/pi-hole/ftl-build:v2.0
platforms: ${{ matrix.platform }}
@@ -94,36 +93,39 @@ jobs:
pull: true
# Do not push anything
push: false
# Load into daemon for subsequent steps
load: true
context: .
target: result
file: .github/Dockerfile
outputs: |
type=tar,dest=build.tar
build-args: |
"CI_ARCH=${{ matrix.platform }}"
"GIT_BRANCH=${{ needs.smoke-tests.outputs.GIT_BRANCH }}"
"GIT_TAG=${{ needs.smoke-tests.outputs.GIT_TAG }}"
-
name: "Build"
run: |
bash build.sh "-DSTATIC=${STATIC}"
name: List files in current directory
run: ls -l
-
name: "Binary checks"
name: Extract FTL binary from container
run: |
bash test/arch_test.sh
-
name: "Test binaries"
run: |
bash test/run.sh
tar -xf build.tar pihole-FTL
-
name: "Generate checksum file"
run: |
mv pihole-FTL "${{ matrix.bin_name }}"
sha1sum pihole-FTL-* > ${{ matrix.bin_name }}.sha1
-
name: Store binary artifacts for deployoment
name: Store binary artifacts for later deployoment
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v3.1.2
with:
name: tmp-storage
path: '${{ matrix.bin_name }}*'
-
name: Tar documentation files
name: Extract documentation files from container
if: github.event_name != 'pull_request' && matrix.platform == 'linux/amd64'
run: tar -C src/api/docs/content/ -czvf api-docs.tar.gz .
run: |
tar -xf build.tar api-docs.tar.gz
-
name: Upload documentation artifacts for deployoment
if: github.event_name != 'pull_request' && matrix.platform == 'linux/amd64'