Use third-party containers as source (#367)

* try fetching ubuntu container from KAH

* test using github token

* oops

* fix container build process for PR's

* v

* whoopsies

* link Alpine to KAH

* try porting bazarr

* oops

* improve bazarr labeling

* need version before setting dockerfile

* Fix platform (as SCALE doesn't run on ARM officially)

* Cleanup all Apps related to KAH

* only update base if base exists and do so on an per-app basis
This commit is contained in:
Kjeld Schouten-Lebbing
2021-04-16 14:21:18 +02:00
committed by GitHub
parent 038bed661c
commit 99bb72cb13
83 changed files with 290 additions and 3707 deletions

View File

@@ -52,7 +52,7 @@ jobs:
- name: hadolint
uses: reviewdog/action-hadolint@v1.17.1
with:
github_token: ${{ secrets.BOT_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
filter_mode: diff_context
fail_on_error: true
@@ -83,7 +83,7 @@ jobs:
echo ::set-output name=category::${CATEGORY}
VERSION=$(cat ./.containers/${CATEGORY}/${{ matrix.container }}/VERSION)
echo ::set-output name=version::${VERSION}
PLATFORM=$(cat ./.containers/${CATEGORY}/${{ matrix.container }}/PLATFORM)
PLATFORM="linux/amd64"
echo ::set-output name=platform::${PLATFORM}
if test -f "./.containers/${CATEGORY}/${{ matrix.container }}/goss.yaml"; then
echo ::set-output name=goss::true
@@ -92,17 +92,22 @@ jobs:
fi
if [ "${{github.event_name}}" == "pull_request" ]; then
echo ::set-output name=push::false
echo ::set-output name=cache_from::"type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}:buildcache"
echo ::set-output name=cache_to::""
else
echo ::set-output name=push::true
echo ::set-output name=cache_from::"type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}:buildcache"
echo ::set-output name=cache_to::"type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}:buildcache,mode=max"
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
platforms: amd64
- name: Login to GHCR
uses: docker/login-action@v1
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
@@ -135,8 +140,8 @@ jobs:
load: true
tags: |
ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}:test
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}:buildcache,mode=max
cache-from: ${{ steps.prep.outputs.cache_from }}
cache-to: ${{ steps.prep.outputs.cache_to }}
# Run GOSS tests if included with the container
- name: Run GOSS tests
@@ -158,8 +163,8 @@ jobs:
tags: |
ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}:latest
ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}:v${{ steps.prep.outputs.version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}:buildcache,mode=max
cache-from: ${{ steps.prep.outputs.cache_from }}
cache-to: ${{ steps.prep.outputs.cache_to }}
container-build-complete:
needs: [build]

View File

@@ -29,10 +29,14 @@ jobs:
echo "App: ${app} using version: ${version}"
fi
fi
base=$(cat "./.containers/base/ubuntu/VERSION")
if [[ ! -z "${base}" || "${base}" != "null" ]]; then
echo "${base}" | tee ".containers/apps/${app}/BASE" > /dev/null
echo "App: ${app} using Base: ${base}"
if test -f "./.containers/apps/${app}/BASE"; then
if test -f "./.containers/apps/${app}/latest-base.sh"; then
base=$(bash "./.containers/apps/${app}/latest-base.sh")
if [[ ! -z "${base}" || "${base}" != "null" ]]; then
echo "${base}" | tee ".containers/apps/${app}/BASE" > /dev/null
echo "App: ${app} using Base: ${base}"
fi
fi
fi
done
- name: Fetch new base versions