Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

Bump docker/setup-buildx-action from 3 to 4 #256

Bump docker/setup-buildx-action from 3 to 4

Bump docker/setup-buildx-action from 3 to 4 #256

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '30 5 * * 0'
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
env:
PLAYWRIGHT_BROWSERS_PATH: /home/runner/.cache/ms-playwright
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run ESLint
run: npm run lint
- name: Check formatting
run: npm run format:check
- name: Type check
run: npm run typecheck
test:
runs-on: ubuntu-latest
permissions:
contents: read
env:
PLAYWRIGHT_BROWSERS_PATH: /home/runner/.cache/ms-playwright
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Run unit tests
run: npm run test
- name: Run Playwright suite
run: npm run test:e2e
build-docker:
runs-on: ubuntu-latest
needs: [lint, test]
if: github.ref == 'refs/heads/main'
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: static-site
path: out
build-pages:
runs-on: ubuntu-latest
needs: [lint, test]
if: github.ref == 'refs/heads/main'
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Build for GitHub Pages
env:
NEXT_PUBLIC_BASE_PATH: NewsBoxZero
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: out
release-docker:
runs-on: ubuntu-latest
needs: [build-docker]
if: github.ref == 'refs/heads/main'
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Download build artifact
uses: actions/download-artifact@v8
with:
name: static-site
path: ./out
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ghcr.io/paulstaab/newsboxzero:latest
platforms: linux/amd64,linux/arm64
release-github-pages:
needs: [build-pages]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4