Start with 'save command changes' functionality #1776
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: SelfService - Web | |
on: | |
push: | |
branches-ignore: | |
- 'main' | |
env: | |
SOURCE_PATH: "Source/SelfService/Web" | |
DOCKER_FILE: "Source/SelfService/Web/Dockerfile" | |
DOCKER_IMAGE_TAG: "dolittle/self-service-web" | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
outputs: | |
src: ${{ steps.filter.outputs.src }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
src: | |
- '${{ env.SOURCE_PATH }}/**' | |
- 'Source/Shared/**' | |
- .github/workflows/selfservice-web* | |
- .github/workflows/update* | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
registry-url: "https://registry.npmjs.org" | |
- name: Install dependencies | |
if: steps.filter.outputs.src == 'true' | |
working-directory: ${{ env.SOURCE_PATH}} | |
run: yarn | |
- name: CI | |
if: steps.filter.outputs.src == 'true' | |
working-directory: ${{ env.SOURCE_PATH}} | |
run: yarn ci | |
docker: | |
needs: ci | |
if: needs.ci.outputs.src == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Get git branch name | |
run: echo "::set-output name=branch::$(echo ${GITHUB_REF##*/})" | |
id: get_branch | |
- name: Push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
context: . | |
file: ./${{ env.DOCKER_FILE }} | |
tags: ${{ env.DOCKER_IMAGE_TAG }}:${{ steps.get_branch.outputs.branch }} | |
build-args: | | |
MUI_LICENSE_KEY_ARG=${{ secrets.MUI_LICENSE_KEY_STUDIO }} |