chore: add new markets #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- dev | |
- main | |
tags: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
docker: | |
runs-on: ${{ vars.RUNNER_SCALE_SET }} | |
steps: | |
- name: Import Secrets from Vault | |
id: vault | |
uses: hashicorp/vault-action@v3 | |
with: | |
url: ${{ vars.VAULT_ADDR }} | |
path: ${{ vars.VAULT_PATH }} | |
method: kubernetes | |
role: ${{ vars.VAULT_ROLE }} | |
secrets: | | |
${{ vars.VAULT_PATH }}/data/${{ vars.VAULT_SECRET_PATH }} * | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to the registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ vars.DOCKER_REGISTRY }} | |
username: ${{ vars.DOCKER_USERNAME }} | |
password: ${{ env.DOCKER_PASSWORD }} | |
- name: Extract metadata (tags, labels) for private registry | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_PROJECT }}/${{ vars.DOCKER_IMAGE }} | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
- name: Cache cargo | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/ | |
~/.cargo/git/ | |
target/ | |
key: ${{runner.os}}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build and push the image to registry | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |