Skip to content

chore(deps): bump docker/build-push-action from 6 to 7 (#851) #446

chore(deps): bump docker/build-push-action from 6 to 7 (#851)

chore(deps): bump docker/build-push-action from 6 to 7 (#851) #446

Workflow file for this run

name: CI
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
permissions:
contents: read
env:
REGISTRY: ghcr.io
NODE_VERSION: 22
jobs:
build:
name: Build
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Build and Push
uses: docker/build-push-action@v7
with:
target: dist
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
check-commit:
name: Check / Commit
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Lint
uses: wagoid/commitlint-github-action@v6
check-eslint:
name: Check / ESLint
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup NodeJS
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install
run: npm ci
- name: Run ESLint
run: npx eslint --quiet .
check-prettier:
name: Check / Prettier
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup NodeJS
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install
run: npm ci
- name: Run Prettier
run: npx prettier . -l
check-typescript:
name: Check / Typescript
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup NodeJS
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install
run: npm ci
- name: tsc
run: npx tsc --noEmit
test:
name: Test
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup NodeJS
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install
run: npm ci
- name: Test
run: npm run test
release:
name: Publish / Release
runs-on: ubuntu-24.04
needs: [test, build]
if: github.event_name == 'push'
outputs:
git-tag: ${{ steps.semantic.outputs.git-tag }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup NodeJS
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install semantic-release
run: npm i semantic-release@v23.0.7 @semantic-release/exec@v6.0.3 conventional-changelog-conventionalcommits@7.0.2
- name: Run semantic-release
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
publish-ghcr:
name: Publish / GHCR
runs-on: ubuntu-24.04
if: github.repository_owner == 'Virtool' && github.event_name == 'push' && needs.release.outputs.git-tag != ''
needs: [release]
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ needs.release.outputs.git-tag }}
- name: Write VERSION file
run: echo ${{ needs.release.outputs.git-tag }} > VERSION
- name: Login
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Metadata
id: meta
uses: docker/metadata-action@v5
with:
context: git
images: ${{ env.REGISTRY }}/virtool/ui
- name: Build & Push
uses: docker/build-push-action@v7
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
target: dist
labels: ${{ steps.meta.outputs.labels }}