diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml new file mode 100644 index 0000000..862da8d --- /dev/null +++ b/.forgejo/workflows/build.yaml @@ -0,0 +1,35 @@ +on: + push: +jobs: + build: + runs-on: container + container: + image: tiptop:5000/treetrail-backend-ci-base + volumes: + - "/root/.cache/uv:uv_cache" + services: + treetrail-database: + image: treetrail-database + steps: + - uses: actions/checkout@v4 + + - name: Create venv + run: uv venv + - name: Install dependencies + run: uv sync + - name: Run basic test (bootstrap) + run: .venv/bin/pytest -s tests/basic.py + + - name: Build container + uses: actions/buildah-build@v1 + with: + image: treetrail-srv + #tags: foo # v1 ${{ github.sha }} + containerfiles: | + ./Containerfile + + - uses: actions/push-to-registry@v2 + with: + registry: "docker://${{ vars.REPOSITORY }}" + image: treetrail-srv + tags: latest diff --git a/.forgejo/workflows/test.yaml b/.forgejo/workflows/test.yaml deleted file mode 100644 index 66c7174..0000000 --- a/.forgejo/workflows/test.yaml +++ /dev/null @@ -1,19 +0,0 @@ -on: [push] -jobs: - install: - runs-on: container - container: - image: tiptop:5000/treetrail-backend-ci-base - volumes: - - "/root/.cache/uv:uv_cache" - services: - treetrail-database: - image: treetrail-database - steps: - - uses: actions/checkout@v4 - - name: Create venv - run: uv venv - - name: Install dependencies - run: uv sync - - name: Run basic test (bootstrap) - run: .venv/bin/pytest -s tests/basic.py