This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
Bump carbon-components-react from 7.59.23 to 8.59.0 in /cra-client #1459
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
# SPDX-License-Identifier: Apache-2.0 | |
# # Copyright Contributors to the ODPi Egeria project. | |
# | |
name: Egeria react UI build | |
on: | |
push: | |
branches: [main,release-*] | |
pull_request: | |
branches: [main,release-*] | |
# Run client/server in parallel. | |
# Code checkout is small so low overhead, | |
# npm build is slow, so benefits from parallelism | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: "14" | |
- name: Install dependencies for client | |
working-directory: ./cra-client | |
run: npm install | |
- name: Build client | |
working-directory: ./cra-client | |
run: npm run build | |
env: | |
NODE_OPTIONS: "--max_old_space_size=6144" | |
- name: Install dependencies for server | |
working-directory: ./cra-server | |
run: npm install | |
- name: Build server | |
working-directory: ./cra-server | |
run: npm run build | |
env: | |
NODE_OPTIONS: "--max_old_space_size=6144" | |
- name: get-npm-version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@master | |
with: | |
path: cra-server | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
if: ${{ github.event_name == 'push' && github.repository == 'odpi/egeria-react-ui' }} | |
- name: Login to container registry (Quay.io) | |
uses: docker/login-action@v1 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_IO_USERNAME }} | |
password: ${{ secrets.QUAY_IO_ACCESS_TOKEN }} | |
if: ${{ github.event_name == 'push' && github.repository == 'odpi/egeria-react-ui' }} | |
# For releases (ie not main) | |
- name: Build and push (not main merge) | |
if: github.ref != 'refs/heads/main' | |
id: docker_build_release | |
uses: docker/build-push-action@v2 | |
with: | |
push: ${{ github.event_name == 'push' && github.repository == 'odpi/egeria-react-ui' }} | |
tags: odpi/egeria-react-ui:${{ steps.package-version.outputs.current-version}}, quay.io/odpi/egeria-react-ui:${{ steps.package-version.outputs.current-version}} | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
# For main code stream | |
- name: Build and push (main merge) | |
if: github.ref == 'refs/heads/main' | |
id: docker_build_main | |
uses: docker/build-push-action@v2 | |
with: | |
push: ${{ github.event_name == 'push' && github.repository == 'odpi/egeria-react-ui' }} | |
tags: odpi/egeria-react-ui:${{ steps.package-version.outputs.current-version}}, odpi/egeria-react-ui:latest, quay.io/odpi/egeria-react-ui:${{ steps.package-version.outputs.current-version}}, quay.io/odpi/egeria-react-ui:latest | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
- name: Image digest (release) | |
if: github.ref != 'refs/heads/main' | |
run: echo ${{ steps.docker_build_release.outputs.digest }} | |
- name: Image digest (main) | |
if: github.ref == 'refs/heads/main' | |
run: echo ${{ steps.docker_build_main.outputs.digest }} | |
- name: Create Archive | |
run: tar -zcf /tmp/egeria-react-ui.tar.gz . | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: React UI {{ steps.package-version.outputs.current-version}} | |
path: /tmp/egeria-react-ui.tar.gz |