Skip to content

feat(c5): Ambulance waiting list CRUD operations #9

feat(c5): Ambulance waiting list CRUD operations

feat(c5): Ambulance waiting list CRUD operations #9

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Ambulance uFE CI
on:
push:
branches: ['main']
tags:
- 'v1*'
pull_request:
branches: ['main']
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn run build --if-present
- run: yarn test
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
${{ secrets.DOCKERHUB_USERNAME }}/ambulance-ufe
tags: |
type=schedule
type=ref,event=branch
type=ref,event=branch,suffix={{date '.YYYYMMDD.HHmm'}} # napr `main.20210930.1200`
type=ref,event=tag
type=semver,pattern={{version}} # napr pri tagu `v1.0.0`
type=semver,pattern={{major}}.{{minor}} # napr `1.0`
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}} # `latest` pre každý komit do main vetvy
- uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64/v8
file: ./build/docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}