Skip to content

Commit

Permalink
Add github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
lebedenko-ubique committed Sep 19, 2024
1 parent cb8571c commit 7cf94c1
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build_and_upload_docker_int.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Upload Docker image (INT)
'on':
push:
tags:
- v*
jobs:
create-docker-image:
name: Create Docker Image
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: azure/docker-login@v1
with:
login-server: '${{ secrets.UBIQUE_ACR_REGISTRY }}'
username: '${{ secrets.UBIQUE_ACR_USERNAME }}'
password: '${{ secrets.UBIQUE_ACR_PASSWORD }}'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker Metadata
id: docker_meta
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.UBIQUE_ACR_REGISTRY }}/sprind-next-gen-signing-service
tags: >
# dynamically set the branch name and sha as a custom tag if
tag_add_commithash is enabled
type=semver,pattern={{raw}},value=${{ github.ref_name }},enable=true
type=raw,value=${{ github.ref_name }}-{{sha}},enable=true
# set latest tag for default branch
type=raw,value=latest,enable=true
- name: Docker build and push
uses: docker/build-push-action@v5
with:
tags: '${{ steps.docker_meta.outputs.tags }}'
labels: '${{ steps.docker_meta.outputs.labels }}'
file: ./Dockerfile
push: true
context: .
cache-from: type=gha
cache-to: 'type=gha,mode=max'
17 changes: 17 additions & 0 deletions .github/workflows/rust_clippy_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Rust Clippy Check
'on':
- pull_request
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
- name: Run clippy
run: cargo clippy -- -D warnings
17 changes: 17 additions & 0 deletions .github/workflows/rust_format_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Rust Format Check
'on':
- pull_request
jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
- name: Run rustfmt
run: cargo fmt -- --check

0 comments on commit 7cf94c1

Please sign in to comment.