From 3db46d01307cac6cc9ee0d9590f6dfc646a84a0c Mon Sep 17 00:00:00 2001 From: Timo Boomers Date: Fri, 18 Jul 2025 10:24:28 +0200 Subject: [PATCH] Added actions --- .gitea/workflows/ci.yml | 53 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..ec02e83 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,53 @@ +name: Cargo Build & Test + +on: + push: + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + build_and_test: + name: Timo's Workouts - latest + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: + - stable + - beta + - nightly + steps: + - uses: actions/checkout@v4 + - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - run: cargo build --verbose + - run: cargo test --verbose + + push: + name: Push to container registry + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: rustup update stable && rustup default stable + + - name: Login in to the container registry + uses: docker/login-action + with: + registry: gitea.xeovalyte.dev + username: ${{ gitea.actor }} + password: ${{ secrets.GITEA_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action + with: + images: gitea.xeovalyte.dev/${{ gitea.repository }} + + - name: Build an publish + id: push + uses: docker/build-push-action + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}