name: CI on: [push] jobs: build-test: runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v5 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: '8.4' - name: Install phing run: composer global require phing/phing - name: Run composer run: composer install --no-dev --no-scripts -o - name: Build tailwind run: APP_ENV=build php bin/console tailwind:build - name: Install frontend assets run: APP_ENV=build php bin/console importmap:install - name: Compile assets run: APP_ENV=build php bin/console asset-map:compile - name: Create docker image run: | version="${{ gitea.REF_NAME }}" docker build -f docker/Dockerfile.app \ -t code.caldwell.digital/home/torsearch-app:${version} \ -t code.caldwell.digital/home/torsearch-app:latest \ --build-arg "APP_VERSION=${version}" \ --build-arg "TMDB_API=${TMDB_API}" \ . docker push code.caldwell.digital/home/torsearch-app:${version} docker push code.caldwell.digital/home/torsearch-app:latest - name: Create artifact run: | file="torsearch-${{ gitea.REF_NAME }}.tar.gz" touch $file tar -czf $file --exclude=$file . - name: Create release uses: akkuman/gitea-release-action@v1 with: files: |- "torsearch-${{ gitea.REF_NAME }}.tar.gz" # - name: Upload artifact # uses: actions/upload-artifact@v3 # with: # name: "torsearch-${{ gitea.REF_NAME }}.tar.gz" # path: "torsearch-${{ gitea.REF_NAME }}.tar.gz" # compression_level: 9