Skip to content

feat(ci/cd): update workflows #4

feat(ci/cd): update workflows

feat(ci/cd): update workflows #4

Workflow file for this run

name: Build and deploy
on:
push:
branches:
- main
# paths:
# - apps/**
# - libs/**
# Needed for nx-set-shas when run on the main branch
permissions:
actions: read
contents: read
env:
DOCKER_IMAGE: otwld/velero-ui
NX_BASE: main
jobs:
main:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'
- run: yarn install --frozen-lockfile
- uses: nrwl/nx-set-shas@v3
# - run: npx nx-cloud record -- nx format:check
- run: yarn nx run-many -t lint build --prod
- name: get-npm-version
id: package-version
uses: martinbeentjes/[email protected]
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker Image
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }}, ${{ env.DOCKER_IMAGE }}:latest