Skip to content

Update eslint monorepo to v9.10.0 #3778

Update eslint monorepo to v9.10.0

Update eslint monorepo to v9.10.0 #3778

Workflow file for this run

name: frontend
on:
workflow_dispatch:
push:
paths:
- "frontend/**"
- ".github/workflows/frontend.yml"
jobs:
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
package_json_file: frontend/package.json
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: pnpm install
working-directory: frontend
- run: pnpm run lint
working-directory: frontend
- run: pnpm run build
working-directory: frontend
- name: Build docker image
id: docker_build
uses: docker/build-push-action@v6
with:
context: frontend
push: ${{ github.ref == 'refs/heads/main' }}
tags: blindern/intern-frontend:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Deploy
if: github.ref == 'refs/heads/main'
run: |
curl --fail -L -i -H "authorization: bearer $DEPLOYER_TOKEN" -H "content-type: application/json" -X POST https://deployer.foreningenbs.no/deploy -d '
{
"service": "intern",
"attributes": {
"frontend_image": "blindern/intern-frontend@${{ steps.docker_build.outputs.digest }}"
}
}'
env:
DEPLOYER_TOKEN: ${{ secrets.DEPLOYER_TOKEN }}