104 lines
3.6 KiB
YAML
104 lines
3.6 KiB
YAML
name: Docker - Nightly
|
|
on:
|
|
workflow_dispatch:
|
|
# Note: this only runs on the default branch
|
|
schedule:
|
|
- cron: '36 12 * * *'
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
jobs:
|
|
build_nightlies:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
- name: "Populate frontend version information"
|
|
run: "cd webapp/frontend && ./git.version.sh"
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
with:
|
|
platforms: 'arm64'
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
# Login against a Docker registry except on PR
|
|
# https://github.com/docker/login-action
|
|
- name: Log into registry ${{ env.REGISTRY }}
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
# Extract metadata (tags, labels) for Docker
|
|
# https://github.com/docker/metadata-action
|
|
- name: Extract Docker metadata for omnibus
|
|
id: meta_omnibus
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
tags: |
|
|
type=raw,enable=true,value=nightly,suffix=-omnibus
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
# Build and push Docker image with Buildx (don't push on PR)
|
|
# https://github.com/docker/build-push-action
|
|
- name: Build and push omnibus Docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
platforms: linux/amd64,linux/arm64
|
|
context: .
|
|
file: docker/Dockerfile
|
|
push: true
|
|
tags: ${{ steps.meta_omnibus.outputs.tags }}
|
|
labels: ${{ steps.meta_omnibus.outputs.labels }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
# Extract metadata (tags, labels) for Docker
|
|
# https://github.com/docker/metadata-action
|
|
- name: Extract Docker metadata for collector
|
|
id: meta_collector
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
tags: |
|
|
type=raw,enable=true,value=nightly,suffix=-collector
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
# Build and push Docker image with Buildx (don't push on PR)
|
|
# https://github.com/docker/build-push-action
|
|
- name: Build and push collector Docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
platforms: linux/amd64,linux/arm64
|
|
context: .
|
|
file: docker/Dockerfile.collector
|
|
push: true
|
|
tags: ${{ steps.meta_collector.outputs.tags }}
|
|
labels: ${{ steps.meta_collector.outputs.labels }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
# Extract metadata (tags, labels) for Docker
|
|
# https://github.com/docker/metadata-action
|
|
- name: Extract Docker metadata for web
|
|
id: meta_web
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
tags: |
|
|
type=raw,enable=true,value=nightly,suffix=-web
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
# Build and push Docker image with Buildx (don't push on PR)
|
|
# https://github.com/docker/build-push-action
|
|
- name: Build and push web Docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
platforms: linux/amd64,linux/arm64
|
|
context: .
|
|
file: docker/Dockerfile.web
|
|
push: true
|
|
tags: ${{ steps.meta_web.outputs.tags }}
|
|
labels: ${{ steps.meta_web.outputs.labels }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|