Skip to content

c17: implement undo

c17: implement undo #6

Workflow file for this run

name: To Master
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
verify-client:
uses: ./.github/workflows/verify-client-reusable.yml
verify-server:
uses: ./.github/workflows/verify-server-reusable.yml
verify:
needs:
- verify-client
- verify-server
uses: ./.github/workflows/verify-reusable.yml
docker-server:
needs:
- verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}-server
tags: |
type=raw,value=${{ steps.package-version.outputs.current-version }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.server
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: ${{ github.event_name == 'push' }}
docker-client:
needs:
- verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Build SPA
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- name: Install dependencies
run: yarn install
working-directory: ./client
shell: bash
- name: Get version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: Run build script
run: yarn build
working-directory: ./client
shell: bash
# Build docker image
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}-client
tags: |
type=raw,value=${{ steps.package-version.outputs.current-version }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.client
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: ${{ github.event_name == 'push' }}