build(deps): Update react monorepo #763
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: Test and push docker images | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
pull_request: | |
branches: [master] | |
jobs: | |
test-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set up node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21 | |
- name: Install Compose | |
uses: ndeloof/[email protected] | |
with: | |
version: v2.23.3 | |
legacy: true | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Test Docker Images | |
run: | | |
make test-upload | |
- name: Build and Push Docker Image | |
if: github.event_name == 'push' | |
run: | | |
# Strip git ref prefix from version | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
# Strip "v" prefix from tag name | |
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | |
# Use Docker `latest` tag convention | |
[ "$VERSION" == "master" ] && VERSION=latest | |
echo "PROJECT_VERSION=$VERSION" >> $GITHUB_ENV | |
IMAGE_VERSION=$VERSION make push-images | |
- name: Get Changelog Entry | |
if: startsWith(github.ref, 'refs/tags/') | |
id: changelog_reader | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
version: v${{ env.PROJECT_VERSION }} | |
path: ./CHANGELOG.md | |
- name: Publish | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
body: ${{ steps.changelog_reader.outputs.changes }} | |
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }} | |
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |