Add CICD to storage
All checks were successful
Build and Push to Registry / build-and-push (push) Successful in 1m28s
All checks were successful
Build and Push to Registry / build-and-push (push) Successful in 1m28s
This commit is contained in:
parent
44472bef1e
commit
120a3dc8d0
@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Rapport de bug
|
||||
about: Signaler un problème
|
||||
labels: bug
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Décrivez le bug.
|
||||
|
||||
## Reproduction
|
||||
|
||||
1. Étapes
|
||||
2. Résultat observé
|
||||
3. Résultat attendu
|
||||
|
||||
## Contexte
|
||||
- Version
|
||||
- OS / Arch
|
||||
- Logs pertinents
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
name: Demande de fonctionnalité
|
||||
about: Proposer une idée
|
||||
labels: enhancement
|
||||
---
|
||||
|
||||
## Problème / Contexte
|
||||
|
||||
Quel problème résout la fonctionnalité ?
|
||||
|
||||
## Proposition
|
||||
|
||||
Décrivez la solution souhaitée.
|
||||
|
||||
## Alternatives
|
||||
|
||||
Solutions alternatives envisagées.
|
||||
|
||||
## Impacts
|
||||
|
||||
Tests, docs, compatibilité.
|
@ -1,13 +0,0 @@
|
||||
# Objet
|
||||
|
||||
Décrivez brièvement les changements.
|
||||
|
||||
## Checklist
|
||||
- [ ] Tests ajoutés/mis à jour (`tests/`)
|
||||
- [ ] Documentation mise à jour (`docs/`)
|
||||
- [ ] `cargo fmt` OK
|
||||
- [ ] `cargo clippy` sans warnings
|
||||
- [ ] `CHANGELOG.md` mis à jour si nécessaire
|
||||
|
||||
## Liens
|
||||
- Issue liée: #
|
@ -1,30 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
rust:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Cache cargo
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Format check
|
||||
run: cargo fmt --all -- --check
|
||||
- name: Clippy
|
||||
run: cargo clippy --all-targets --all-features -- -D warnings
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
- name: Test
|
||||
run: cargo test --all --verbose
|
@ -1,46 +0,0 @@
|
||||
name: Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- docker-support
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ secrets.DOCKER_REGISTRY }}/sdk_storage
|
||||
tags: |
|
||||
type=raw,value=latest,enable=${{ github.ref_type == 'branch' && github.ref_name == 'docker-support' }}
|
||||
type=ref,event=tag
|
||||
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
- name: Login to registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ secrets.DOCKER_REGISTRY }}
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64,linux/arm64
|
@ -1,34 +0,0 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
build-release:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Build
|
||||
run: cargo build --release
|
||||
- name: Archive artifact
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p dist
|
||||
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||
cp target/release/sdk_storage.exe dist/
|
||||
else
|
||||
cp target/release/sdk_storage dist/
|
||||
fi
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sdk_storage-${{ runner.os }}
|
||||
path: dist/*
|
44
.github/workflows/dev.yml
vendored
Normal file
44
.github/workflows/dev.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
name: Build and Push to Registry
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ dev ]
|
||||
|
||||
env:
|
||||
REGISTRY: git.4nkweb.com
|
||||
IMAGE_NAME: 4nk/sdk_storage
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up SSH agent
|
||||
uses: webfactory/ssh-agent@v0.9.1
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.USER }}
|
||||
password: ${{ secrets.TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
ssh: default
|
||||
build-args: |
|
||||
CONF=${{ secrets.CONF }}
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ gitea.sha }}
|
Loading…
x
Reference in New Issue
Block a user