feat: ✨ utils for license text and support to store license (#38) #29
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
# Deployed to https://staging.api.fairhub.io | |
name: (staging) Build and push api image to Azure Container Registry | |
on: | |
push: | |
branches: | |
- staging | |
pull_request: | |
types: [closed] | |
branches: | |
- staging | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build and push Docker image | |
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) | |
runs-on: ubuntu-latest | |
env: | |
AZURE_REGISTRY_LOGIN_SERVER: ${{ secrets.AZURE_REGISTRY_LOGIN_SERVER }} | |
AZURE_REGISTRY_USERNAME: ${{ secrets.AZURE_REGISTRY_USERNAME }} | |
AZURE_REGISTRY_PASSWORD: ${{ secrets.AZURE_REGISTRY_PASSWORD }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Wait for format check | |
uses: lewagon/[email protected] | |
with: | |
ref: staging | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
check-name: 'Run formatter' | |
- name: Wait for linting to pass | |
uses: lewagon/[email protected] | |
with: | |
ref: staging | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
check-name: 'Run linters (3.10)' | |
- name: Wait for tests to pass | |
uses: lewagon/[email protected] | |
with: | |
ref: staging | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
check-name: 'Run tests (3.10)' | |
- name: Login to Azure Container Registry | |
uses: azure/docker-login@v1 | |
with: | |
login-server: ${{ secrets.AZURE_REGISTRY_LOGIN_SERVER }} | |
username: ${{ secrets.AZURE_REGISTRY_USERNAME }} | |
password: ${{ secrets.AZURE_REGISTRY_PASSWORD }} | |
- name: Get GitHub short SHA | |
id: git_sha | |
run: echo ::set-output name=sha::$(git rev-parse --short ${{ github.sha }}) | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ secrets.AZURE_REGISTRY_LOGIN_SERVER }}/fairhub:staging,${{ secrets.AZURE_REGISTRY_LOGIN_SERVER }}/fairhub:${{ steps.git_sha.outputs.sha }} |