Skip to content

hack in support for webm #8

hack in support for webm

hack in support for webm #8

name: Build and push frontend for beta.frikanalen.no
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
packages: write # Needed to push to ghcr.io
jobs:
build:
name: Build and push prod Docker image to GHCR
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract Docker metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/frikanalen/legacy-frontend-beta
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=tag
type=ref,event=branch
type=ref,event=tag
type=raw,value=latest
type=sha
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and (if not PR) push
uses: docker/build-push-action@v5
with:
build-args: |
NEXT_PUBLIC_DJANGO_URL=https://beta.frikanalen.no/api/
NEXT_PUBLIC_UPLOAD_URL=https://beta.frikanalen.no/upload/files
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max