diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0f0f07b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release container + +on: + push: + tags: [ "*" ] + +jobs: + build: + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + - name: Build container + run: just build-container + + publish: + runs-on: self-hosted + name: Publish container + needs: build + steps: + - name: Login to registry + run: echo "${{ secrets.GITHUB_TOKEN }}" | podman login ghcr.io -u ${{ github.actor }} --password-stdin + + - name: Publish image + run: | + podman push ghcr.io/virto-network/virto-proxy:$(just version) + podman push ghcr.io/virto-network/virto-proxy:latest diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 31000a2..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Rust - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose diff --git a/justfile b/justfile index eabe10b..15d9aac 100644 --- a/justfile +++ b/justfile @@ -5,6 +5,9 @@ image := "ghcr.io/virto-network/virto-proxy" @default: just --list +@version: + echo {{ ver }} + build-container: #!/usr/bin/env nu 'FROM rust:1.75 as builder