Skip to content

BIT-120 - Fix PDF render (#83) #165

BIT-120 - Fix PDF render (#83)

BIT-120 - Fix PDF render (#83) #165

Workflow file for this run

name: build
on:
push:
branches:
- "master"
tags:
- "v*"
pull_request:
branches:
- "master"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn
- run: yarn run build
create_release:
name: Create Release
runs-on: ubuntu-latest
needs: [build]
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
prerelease: ${{ contains(github.ref_name, 'beta') }}
generate_release_notes: true
release-docker:
name: Release Docker Hub
runs-on: ubuntu-latest
needs: [create_release]
if: contains(github.ref_name, 'beta') == false
outputs:
version: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: bloock/valid-proof
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Update repo description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: bloock/valid-proof
deploy-dev:
name: Deploy DEV
runs-on: ubuntu-latest
needs: [create_release]
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.repo_api_token }}
repository: bloock/managed-services-actions
event-type: deploy_valid_proof_dev
client-payload: '{"version": "${{ github.ref_name }}"}'
deploy-pro:
name: Deploy PRO
runs-on: ubuntu-latest
needs: [create_release]
if: contains(github.ref_name, 'beta') == false
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.repo_api_token }}
repository: bloock/managed-services-actions
event-type: deploy_valid_proof_pro
client-payload: '{"version": "${{ github.ref_name }}"}'