Skip to content

Build

Build #7

Workflow file for this run

name: "Build"
on:
workflow_dispatch:
repository_dispatch:
types:
- webhook
release:
types:
- published
#push:
# branches:
# - master
# paths:
# - "app/**"
# - "nginx/**"
# - "docker-compose-build.yaml"
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
packages: write
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup Node"
uses: actions/setup-node@v4
with:
node-version: 20
- name: "Install Dependencies"
run: |
npm install
- name: "Update Cache Version"
env:
SERVICE_WORKER: app/static/js/sw.js
run: |
echo "Updating Cache to Version: v${GITHUB_RUN_NUMBER}"
sed -i "0,/v1/s//v${GITHUB_RUN_NUMBER}/" ${SERVICE_WORKER}
head ${SERVICE_WORKER} -n 4
- name: "Docker Login"
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ vars.GHCR_USER }}
password: ${{ secrets.GHCR_PASS }}
- name: "Setup Buildx"
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64
- name: "Bake and Push"
uses: docker/bake-action@v5
with:
files: docker-bake.json
push: true
- name: "Trigger Deploy"
uses: benc-uk/workflow-dispatch@v1
with:
workflow: deploy.yaml