Restore Docker Login action removed by mistake #2384
Workflow file for this run
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: Node CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.17.1] | |
env: | |
CI: true | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "yarn" | |
- name: Yarn install | |
run: | | |
yarn --immutable | |
- name: Build front-end | |
run: | | |
yarn build-front:prod | |
- name: Run Prettier | |
run: | | |
yarn prettier:check | |
- name: Run ESLint | |
run: | | |
yarn eslint | |
- name: Run stylelint | |
run: | | |
yarn stylelint | |
- name: TS type check | |
run: | | |
yarn type-check | |
- name: Cache MongoDB binary | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/mongodb-binaries | |
key: ${{ runner.os }}-mongodb | |
- name: Run Vitest tests | |
run: | | |
yarn test | |
- name: Run Playwright tests | |
run: | | |
yarn docker-compose:test | |
- name: Upload test results if Playwright tests failed | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: playwright-videos | |
path: client/playwright/test-results/ | |
- name: Build staging container | |
if: github.ref == 'refs/heads/main' | |
run: | | |
yarn docker:build-staging | |
- name: Push staging container to AWS ECR | |
if: github.ref == 'refs/heads/main' | |
uses: jwalton/[email protected] | |
with: | |
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
region: eu-west-1 | |
image: konsti-staging:latest | |
- name: Create frontend-staging Sentry release | |
if: github.ref == 'refs/heads/main' | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: konsti | |
SENTRY_PROJECT: konsti-frontend-staging | |
with: | |
sourcemaps: "./client/build" | |
- name: Create backend-staging Sentry release | |
if: github.ref == 'refs/heads/main' | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: konsti | |
SENTRY_PROJECT: konsti-backend-staging | |
- name: Build prod container | |
if: github.ref == 'refs/heads/main' | |
run: | | |
yarn docker:build-prod | |
- name: Push prod container to AWS ECR | |
if: github.ref == 'refs/heads/main' | |
uses: jwalton/[email protected] | |
with: | |
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
region: eu-west-1 | |
image: konsti-prod:latest | |
- name: Create frontend-prod Sentry release | |
if: github.ref == 'refs/heads/main' | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: konsti | |
SENTRY_PROJECT: konsti-frontend-prod | |
with: | |
sourcemaps: "./client/build" | |
- name: Create backend-prod Sentry release | |
if: github.ref == 'refs/heads/main' | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: konsti | |
SENTRY_PROJECT: konsti-backend-prod |