Update dependencies #124
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: Build & Test | |
on: [push, pull_request] | |
permissions: | |
packages: write | |
contents: read | |
jobs: | |
quality: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run build | |
- name: SonarQube Scan | |
uses: sonarsource/[email protected] | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
- name: SonarQube Quality Gate check | |
uses: sonarsource/[email protected] | |
# Force to fail step after specific time | |
timeout-minutes: 5 | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
build_and_push_tag: | |
if: startsWith(github.event.ref, 'refs/tags/') | |
needs: quality | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run build | |
- name: Build & Push Docker image | |
uses: docker/[email protected] | |
with: | |
push: true | |
context: . | |
tags: ghcr.io/dysnomia-studio/dysnomia-website:${{ github.head_ref || github.ref_name }} | |
deploy_app: | |
needs: build_and_push_tag | |
runs-on: ubuntu-latest | |
steps: | |
- name: Update infra | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.UPDATE_INFRA_TOKEN }} | |
repository: Dysnomia-studio/argocd-infra | |
event-type: update-infra |