Deploy v0.1.4 (Dev) #16
Workflow file for this run
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: Build and Deploy (Dev) | |
'on': | |
push: | |
tags: | |
- v* | |
workflow_dispatch: | |
inputs: | |
repo_branch: | |
description: Repo branch | |
type: string | |
required: true | |
default: main | |
run-name: 'Deploy ${{ inputs.repo_branch || github.ref_name }} (Dev)' | |
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 }}/next-gen-signing-service-dev | |
tags: | | |
# dynamically set the branch name and sha as a custom tag if tag_add_commithash is enabled | |
type=raw,value=${{ inputs.repo_branch || 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' | |
deploy: | |
name: Deploy Dev Webserver | |
uses: UbiqueInnovation/workflows-backend/.github/workflows/k8s_deploy.yml@main | |
needs: | |
- create-docker-image | |
with: | |
ref_name: '${{ inputs.repo_branch || github.ref_name }}' | |
tag_add_commithash: true | |
namespace: sprind-eudi | |
app_name: next-gen-signing-service-dev | |
app_directory: . | |
target: dev | |
with_configmap: false | |
secrets: | |
acr_registry: '${{ secrets.UBIQUE_ACR_REGISTRY }}' | |
acr_username: '${{ secrets.UBIQUE_ACR_USERNAME }}' | |
acr_password: '${{ secrets.UBIQUE_ACR_PASSWORD }}' | |
az_client_id: '${{ secrets.AZ_UB_CLIENT_ID }}' | |
az_tenant_id: '${{ secrets.AZ_UB_TENANT_ID }}' | |
az_subscription_id: '${{ secrets.AZ_UB_SUBSCRIPTION_ID }}' |