Merge pull request #583 from team-monite/fix/payment-terms-i18n #63
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: Build Images and Deploy to Dev | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-sdk-react: | |
name: Build and Push sdk-react | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: werf/actions/install@v2 | |
with: | |
version: v2.16.2 | |
- name: Log in to GitLab Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: registry.monite.com | |
username: ${{ vars.GITLAB_BOT_USERNAME }} | |
password: ${{ secrets.GITLAB_BOT_ACCESS_TOKEN }} | |
- name: Build and Push All Images | |
run: | | |
. $(werf ci-env github --as-file) | |
werf export \ | |
--config werf.react.yaml \ | |
--parallel-tasks-limit=-1 \ | |
--repo registry.monite.com/monite/frontend/sdkapp \ | |
--tag registry.monite.com/monite/frontend/sdkapp:%image%-${{ github.sha }} | |
build-sdk-demo: | |
name: Build and Push sdk-demo | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: werf/actions/install@v2 | |
with: | |
version: v2.16.2 | |
- name: Log in to GitLab Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: registry.monite.com | |
username: ${{ vars.GITLAB_BOT_USERNAME }} | |
password: ${{ secrets.GITLAB_BOT_ACCESS_TOKEN }} | |
- name: Build and Push All Images | |
run: | | |
. $(werf ci-env github --as-file) | |
werf export \ | |
--config werf.demo.yaml \ | |
--parallel-tasks-limit=-1 \ | |
--repo registry.monite.com/monite/frontend/sdkapp \ | |
--tag registry.monite.com/monite/frontend/sdkapp:%image%-${{ github.sha }} | |
build-sdk-drop-in: | |
name: Build and Push sdk-drop-in | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: werf/actions/install@v2 | |
with: | |
version: v2.16.2 | |
- name: Log in to GitLab Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: registry.monite.com | |
username: ${{ vars.GITLAB_BOT_USERNAME }} | |
password: ${{ secrets.GITLAB_BOT_ACCESS_TOKEN }} | |
- name: Build and Push All Images | |
run: | | |
. $(werf ci-env github --as-file) | |
werf export \ | |
--config werf.drop_in.yaml \ | |
--parallel-tasks-limit=-1 \ | |
--repo registry.monite.com/monite/frontend/sdkapp \ | |
--tag registry.monite.com/monite/frontend/sdkapp:%image%-${{ github.sha }} | |
trigger-gitlab-deploy: | |
name: Trigger GitLab Deployment to Dev | |
runs-on: ubuntu-latest | |
needs: | |
- build-sdk-demo | |
- build-sdk-drop-in | |
steps: | |
- name: Trigger GitLab Pipeline Deploy to Dev | |
run: | | |
REPO="${{ secrets.GITLAB_REPOSITORY }}" | |
PROJECT_ID="${{ secrets.GITLAB_GROUP_ID }}" | |
GITLAB_TOKEN="${{ secrets.GITLAB_TRIGGER_TOKEN }}" | |
SDK_DEMO_WITH_NEXTJS_AND_CLERK_AUTH="sdk-demo-with-nextjs-and-clerk-auth-${{ github.sha }}" | |
SDK_DEMO_NGINX="sdk-demo-nginx-${{ github.sha }}" | |
SDK_DROP_IN_NGINX="sdk-drop-in-nginx-${{ github.sha }}" | |
echo "sdk-demo-with-nextjs-and-clerk-auth = $SDK_DEMO_WITH_NEXTJS_AND_CLERK_AUTH" | |
echo "sdk-demo-nginx = $SDK_DEMO_NGINX" | |
echo "sdk-drop-in-nginx = $SDK_DROP_IN_NGINX" | |
curl --request POST \ | |
--form token="${GITLAB_TOKEN}" \ | |
--form ref="master" \ | |
--form "variables[GITHUB_SHA]=${{ github.sha }}" \ | |
--form "variables[SDK_DEMO_WITH_NEXTJS_AND_CLERK_AUTH]=${SDK_DEMO_WITH_NEXTJS_AND_CLERK_AUTH}" \ | |
--form "variables[SDK_DEMO_NGINX]=${SDK_DEMO_NGINX}" \ | |
--form "variables[SDK_DROP_IN_NGINX]=${SDK_DROP_IN_NGINX}" \ | |
--form "variables[GITHUB_BRANCH]=${{ github.ref_name }}" \ | |
--form "variables[CI_PIPELINE_SOURCE]=pipeline" \ | |
--form "variables[CI_ACTION]=dev_deploy" \ | |
"https://${REPO}/api/v4/projects/${PROJECT_ID}/trigger/pipeline" | |
trigger-storybook-deploy: | |
name: Trigger GitLab Storybook build and deploy | |
runs-on: ubuntu-latest | |
needs: | |
- build-sdk-demo | |
steps: | |
- name: Trigger GitLab Pipeline Storybook build and deploy | |
run: | | |
REPO="${{ secrets.GITLAB_REPOSITORY }}" | |
PROJECT_ID="${{ secrets.GITLAB_GROUP_ID }}" | |
GITLAB_TOKEN="${{ secrets.GITLAB_TRIGGER_TOKEN }}" | |
SDK_DEMO="sdk-demo-${{ github.sha }}" | |
echo "sdk-demo = $SDK_DEMO" | |
curl --request POST \ | |
--form token="${GITLAB_TOKEN}" \ | |
--form ref="master" \ | |
--form "variables[GITHUB_SHA]=${{ github.sha }}" \ | |
--form "variables[SDK_DEMO]=${SDK_DEMO}" \ | |
--form "variables[GITHUB_BRANCH]=${{ github.ref_name }}" \ | |
--form "variables[CI_PIPELINE_SOURCE]=pipeline" \ | |
--form "variables[CI_ACTION]=build_storybook" \ | |
"https://${REPO}/api/v4/projects/${PROJECT_ID}/trigger/pipeline" |