Skip to content

Teasing 2023

Teasing 2023 #482

Workflow file for this run

name: CI
on:
push:
branches: [master, dev, teaser]
pull_request:
branches: [master, dev, teaser]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- 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: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- 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:
if: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/teaser' || github.ref == 'refs/heads/dev') }}
runs-on: ubuntu-latest
needs:
- lint
- build
env:
RESOURCE_NAME: ${{ github.ref == 'refs/heads/master' && 'prod-front' || github.ref == 'refs/heads/teaser' && 'prod-teaser' || 'dev-front' }}
steps:
- uses: actions/checkout@v3
- name: Install oc
uses: redhat-actions/oc-installer@v1
with:
oc_version: '4.6'
- name: Login to OKD
run: oc login --token=${{ secrets.OKD_TOKEN }} --server=${{ secrets.OKD_SERVER }}
- name: Change the project
run: oc project ${{ secrets.OKD_PROJECT }}
- name: Start the build
run: oc start-build ${{ env.RESOURCE_NAME }} --follow
- uses: lazy-actions/slatify@master
if: ${{ always() }}
with:
type: ${{ job.status }}
job_name: '*Deployment to ${{ env.RESOURCE_NAME }}*'
commit: true
url: ${{ secrets.SLACK_WEBHOOK_URL }}
token: ${{ secrets.GITHUB_TOKEN }}