From 9312a2b37dd0432be991eb6127d2353822fff1ec Mon Sep 17 00:00:00 2001 From: phil Date: Sun, 27 Oct 2024 04:36:35 +0100 Subject: [PATCH] CI: add action using treetrail-backend-ci --- .forgejo/workflows/build-with-app-image.yaml | 35 ++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .forgejo/workflows/build-with-app-image.yaml diff --git a/.forgejo/workflows/build-with-app-image.yaml b/.forgejo/workflows/build-with-app-image.yaml new file mode 100644 index 0000000..8ab5029 --- /dev/null +++ b/.forgejo/workflows/build-with-app-image.yaml @@ -0,0 +1,35 @@ +on: + push: + +jobs: + build: + runs-on: container + container: + image: tiptop:5000/treetrail-backend-ci + volumes: + - "/root/.cache/uv:uv_cache" + services: + treetrail-database: + image: treetrail-database + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies (to uv's project environment) + run: uv sync --locked --no-dev --no-editable + + - name: Run basic test (bootstrap) + run: pytest -s tests/basic.py + + - name: Build container + uses: actions/buildah-build@v1 + with: + image: treetrail-backend + #tags: foo # v1 ${{ github.sha }} + containerfiles: | + ./Containerfile.for_runner + + - uses: actions/push-to-registry@v2 + with: + registry: "docker://${{ vars.REPOSITORY }}" + image: treetrail-backend + tags: latest