diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 31ebf80..467136c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,7 +52,7 @@ jobs: docker images mkdir $HOME/out id=$(docker create ${{ env.BUILD_TAG }}) - docker cp $id:/usr/share/app-builders/VERSION $HOME/out + docker cp $id:/app-builders/VERSION $HOME/out docker rm -v $id echo "VersionTag=$(cat $HOME/out/VERSION)" >> $GITHUB_OUTPUT @@ -124,14 +124,13 @@ jobs: uses: actions/delete-package-versions@v4 with: package-name: "appbuilder-agent-${{ steps.meta.outputs.AppEnv }}" - package-type: 'container' + package-type: "container" min-versions-to-keep: 2 - delete-only-untagged-versions: 'true' + delete-only-untagged-versions: "true" - name: Cleanup older all packages, keep 6 uses: actions/delete-package-versions@v4 with: package-name: "appbuilder-agent-${{ steps.meta.outputs.AppEnv }}" - package-type: 'container' + package-type: "container" min-versions-to-keep: 6 - diff --git a/Dockerfile b/Dockerfile index 938e0ac..c97938c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ +FROM ghcr.io/sillsdev/app-builders:latest as builder + FROM --platform=linux/amd64 phusion/baseimage:jammy-1.0.1 LABEL maintainer="chris_hubbard@sil.org" LABEL refreshed_at="2024-01-11" @@ -12,6 +14,18 @@ RUN apt-get update && apt-get install -y\ pip install ansible &&\ apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/* +RUN mkdir -p /app-builders +WORKDIR /app-builders + +COPY --from=builder / /app-builders/ + +#RUN tar -xvf /app-builders.tgz && rm /app-builders.tgz &&\ +RUN chmod +x /app-builders/*.sh &&\ + ln -s /app-builders/sab.sh /usr/local/bin/scripture-app-builder &&\ + ln -s /app-builders/rab.sh /usr/local/bin/reading-app-builder &&\ + ln -s /app-builders/dab.sh /usr/local/bin/dictionary-app-builder &&\ + ln -s /app-builders/kab.sh /usr/local/bin/keyboard-app-builder + COPY ansible /ansible WORKDIR /ansible @@ -19,7 +33,7 @@ WORKDIR /ansible RUN mkdir -p /etc/ansible && echo local > /etc/ansible/hosts &&\ ansible-playbook playbook.yml -c local &&\ apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/* /tmp/*.* /App \Builder/Scripture\ Apps/App\ Projects/* /tmp/App\ Builder/* /root/App\ Builder/Scripture\ Apps/PWA\ Output - +# #COPY patch /patch #WORKDIR /patch # diff --git a/ansible/roles/app-builders/tasks/main.yml b/ansible/roles/app-builders/tasks/main.yml index 2253a36..d00ae15 100644 --- a/ansible/roles/app-builders/tasks/main.yml +++ b/ansible/roles/app-builders/tasks/main.yml @@ -6,11 +6,12 @@ shell: echo android-sdk-installer android-sdk-installer/accepted-android-sdk-eula boolean true | debconf-set-selections -v - name: Install packages - apt: + apt: pkg: - android-sdk-installer - - app-builders - state: latest + - openjfx + # - app-builders // changed to copying from ghcr.io/sillsdev/app-builders docker container + state: latest update_cache: yes - name: Make directory for files @@ -28,9 +29,8 @@ - about.txt - ab-001-black-144.png - ab-001-black-72.png +# - name: Prime gradle cache with build +# shell: HOME=/root scripture-app-builder -new -n web -p org.ebible -b /root/prime/eng-web_usfm.zip -ks /root/prime/keystore_prime.keystore -i /root/prime/keystore_prime.txt -a /root/prime/about.txt -ic /root/prime/ab-001-black-144.png -ic /root/prime/ab-001-black-72.png -fp build=/tmp/build -- name: Prime gradle cache with build - shell: HOME=/root scripture-app-builder -new -n web -p org.ebible -b /root/prime/eng-web_usfm.zip -ks /root/prime/keystore_prime.keystore -i /root/prime/keystore_prime.txt -a /root/prime/about.txt -ic /root/prime/ab-001-black-144.png -ic /root/prime/ab-001-black-72.png -fp build=/tmp/build - -- name: Prime npm cache with build - shell: HOME=/root scripture-app-builder -new -n bsb -p org.bsb -b /root/prime/eng-bsb_usx.zip -ks /root/prime/keystore_prime.keystore -i /root/prime/keystore_prime.txt -a /root/prime/about.txt -ic /root/prime/ab-001-black-144.png -ic /root/prime/ab-001-black-72.png -fp build=/tmp/build -build-modern-pwa +# - name: Prime npm cache with build +# shell: HOME=/root scripture-app-builder -new -n bsb -p org.bsb -b /root/prime/eng-bsb_usx.zip -ks /root/prime/keystore_prime.keystore -i /root/prime/keystore_prime.txt -a /root/prime/about.txt -ic /root/prime/ab-001-black-144.png -ic /root/prime/ab-001-black-72.png -fp build=/tmp/build -build-modern-pwa