add gitea actions

This commit is contained in:
DataHearth 2023-06-23 16:08:36 +02:00
parent 533ec170ae
commit fa18843d8c
No known key found for this signature in database
GPG Key ID: E88FD356ACC5F3C4
2 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,46 @@
name: Docker
on:
push:
tags: ["v*.*.*"]
jobs:
build-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v4
- name: Log into registry Docker
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Log into registry Gitea
uses: docker/login-action@v2
with:
registry: gitea.antoine-langlois.net
username: ${{ gitea.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
datahearth/tech-bot
gitea.antoine-langlois.net/datahearth/tech-bot
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ steps.meta.outputs.tags }}}
labels: ${{ steps.meta.outputs.labels }}

22
.gitea/workflow/rust.yml Normal file
View File

@ -0,0 +1,22 @@
name: Rust
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
test-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose