Graph connection (#9) #5
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
name: server | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'packages/server/**' | |
branches: | |
- main | |
tags: | |
- 'v:*.*.*' | |
pull_request: | |
paths: | |
- 'packages/server/**' | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/server | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: docker/setup-qemu-action@v2 | |
- uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Docker Tags | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: multiparty/masstech-server | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
- name: Build & Push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./packages/server | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |