Skip to content

Merge pull request #336 from JamesVictor-O/feat/issues-281-287-291-29… #1

Merge pull request #336 from JamesVictor-O/feat/issues-281-287-291-29…

Merge pull request #336 from JamesVictor-O/feat/issues-281-287-291-29… #1

Workflow file for this run

name: Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
name: Create Release PR
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
major: ${{ steps.release.outputs.major }}
minor: ${{ steps.release.outputs.minor }}
patch: ${{ steps.release.outputs.patch }}
steps:
- name: Run release-please
id: release
uses: google-github-actions/release-please-action@v4
with:
release-type: node
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
publish-docker:
name: Build & Push Docker Images
runs-on: ubuntu-latest
needs: release-please
if: needs.release-please.outputs.release_created == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push backend image
uses: docker/build-push-action@v5
with:
context: backend
file: backend/dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}/backend:latest
ghcr.io/${{ github.repository }}/backend:${{ needs.release-please.outputs.tag_name }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push frontend image
uses: docker/build-push-action@v5
with:
context: frontend
file: frontend/dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}/frontend:latest
ghcr.io/${{ github.repository }}/frontend:${{ needs.release-please.outputs.tag_name }}
cache-from: type=gha
cache-to: type=gha,mode=max