Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and Publish Frontend Docker Image

on:
push:
branches: [main]
tags: [ "v*.*.*" ]
workflow_dispatch:

jobs:
Expand All @@ -21,23 +21,28 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Extract version from package.json
id: get_version
run: echo "version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/eosc-data-commons/matchmaker-frontend
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/eosc-data-commons/matchmaker-frontend:latest
ghcr.io/eosc-data-commons/matchmaker-frontend:${{ steps.get_version.outputs.version }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Comment on lines +31 to +48
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow_dispatch can run this workflow on a branch ref, but the metadata action is configured to generate tags only from semver tags (and latest is explicitly disabled on non-tag refs). In that scenario steps.meta.outputs.tags will be empty and the build/push step will fail (or push nothing). Consider either removing workflow_dispatch, or adding a non-tag fallback tag (e.g., sha/ref-based) and/or guarding the push step so it only runs for tag refs.

Copilot uses AI. Check for mistakes.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file.

## [0.5.1] - 2026-02-23

- Updated Docker build and deployment workflow to trigger on version tags and improve image tagging strategy.
- Updated `docker-compose.yml` to use `npm run prod` for the frontend service.

## [0.5.0] - 2026-02-01

- Moved the project from Client Side Rendering (CSR) to Server Side Rendering (SSR) using React Router.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ ENV NODE_ENV=production
ENV PORT=3000

# Start the compiled server
CMD ["npm", "run", "start"]
CMD ["npm", "run", "prod"]
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
# - ./:/app
# - /app/node_modules
# command: npm run dev
command: npm run prod
ports:
- "127.0.0.1:3000:3000"
# - "127.0.0.1:5173:5173" # For development
Expand Down
Loading