Skip to content

Update react monorepo to v19 (major) #911

Update react monorepo to v19 (major)

Update react monorepo to v19 (major) #911

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout
uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: check
run: |
echo $GITHUB_SHA
echo "GIT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV
- name: Extract branch name
shell: bash
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
id: extract_branch
- name: Build and push to GitHub Container Registry
uses: docker/build-push-action@v2
with:
context: ./www
platforms: linux/amd64
push: ${{ steps.extract_branch.outputs.branch == 'main' }}
tags: ghcr.io/gotti/nginx-static:${{ env.GIT_SHA }}
- name: replace TAG_PLACEHOLDER
run: sed -i -e "s/TAG_PLACEHOLDER/${{ env.GIT_SHA }}/" ./manifests/deployment.yaml && cat ./manifests/deployment.yaml
- name: push to deployment
run: |
git config --global user.email "[email protected]"
git config --global user.name "gotti"
git add ./manifests/deployment.yaml
git commit -m "COMMIT by Actions"
git push origin main:deployment -f