on: push: branches: - 'dev' jobs: test-build-and-push: runs-on: docker container: image: iceshrimp.dev/iceshrimp/ci-env:dotnet options: | --volume /opt/iceshrimp-cache/nuget:/root/.nuget --volume /root/.docker:/root/.docker steps: - name: Clone repository run: git clone ${{ github.event.repository.clone_url }} --branch=${{ github.ref_name }} --depth=1 . - name: Print environment info run: dotnet --info - name: Run unit tests run: make test VERBOSE=true DEP_VULN_WERROR=true - name: Build docker image shell: bash run: | make cleanall >/dev/null docker login iceshrimp.dev -u ${{ github.actor }} -p ${{ secrets.REGISTRY_TOKEN }} docker buildx create --name iceshrimp-ci 2>&1 &>/dev/null || true docker buildx build -t iceshrimp.dev/${GITHUB_REPOSITORY@L}:$GITHUB_REF_NAME --provenance=false --platform=linux/amd64,linux/arm64 --push --builder iceshrimp-ci . docker buildx prune --keep-storage 20G --builder iceshrimp-ci