Skip to content

Merge remote-tracking branch 'origin/master' into dev #1275

Merge remote-tracking branch 'origin/master' into dev

Merge remote-tracking branch 'origin/master' into dev #1275

Workflow file for this run

name: CI
on:
push:
branches: [master, dev, teaser]
pull_request:
branches: [master, dev, teaser]
jobs:
lint:
runs-on: self-hosted
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- uses: lazy-actions/slatify@master
if: ${{ failure() }}
with:
type: ${{ job.status }}
job_name: '*Job ${{ github.job }}*'
commit: true
url: ${{ secrets.SLACK_WEBHOOK_URL }}
token: ${{ secrets.GITHUB_TOKEN }}
build:
runs-on: self-hosted
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm build
- uses: lazy-actions/slatify@master
if: ${{ failure() }}
with:
type: ${{ job.status }}
job_name: '*Job ${{ github.job }}*'
commit: true
url: ${{ secrets.SLACK_WEBHOOK_URL }}
token: ${{ secrets.GITHUB_TOKEN }}
deploy-dev:
if: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/dev') }}
runs-on: self-hosted
needs:
- lint
- build
steps:
- uses: actions/checkout@v4
- name: Install docker
uses: docker/setup-buildx-action@v3
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
build-args: |
NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL_DEV }}
NEXT_PUBLIC_UPLOADS_URL=${{ secrets.NEXT_PUBLIC_UPLOADS_URL_DEV }}
NEXT_PUBLIC_GOOGLE_VERIFICATION=${{ secrets.NEXT_PUBLIC_GOOGLE_VERIFICATION_DEV }}
NEXT_PUBLIC_URL=${{ secrets.NEXT_PUBLIC_URL_DEV }}
NEXT_PUBLIC_STRIPE_PUBLIC_KEY=${{ secrets.NEXT_PUBLIC_STRIPE_PUBLIC_KEY_DEV }}
ENVIRONMENT=${{ secrets.ENVIRONMENT_DEV }}
tags: |
${{ secrets.REGISTRY_URL }}/uttarena/front:${{ github.ref == 'refs/heads/master' && 'master' || 'dev' }}
deploy-prod:
if: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/master') }}
runs-on: self-hosted
needs:
- lint
- build
steps:
- uses: actions/checkout@v4
- name: Install docker
uses: docker/setup-buildx-action@v3
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
build-args: |
NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_UPLOADS_URL=${{ secrets.NEXT_PUBLIC_UPLOADS_URL }}
NEXT_PUBLIC_GOOGLE_VERIFICATION=${{ secrets.NEXT_PUBLIC_GOOGLE_VERIFICATION }}
NEXT_PUBLIC_URL=${{ secrets.NEXT_PUBLIC_URL }}
NEXT_PUBLIC_STRIPE_PUBLIC_KEY=${{ secrets.NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
ENVIRONMENT=${{ secrets.ENVIRONMENT }}
tags: |
${{ secrets.REGISTRY_URL }}/uttarena/front:${{ github.ref == 'refs/heads/master' && 'master' || 'dev' }}