Skip to content

feat: final changes before public #1

feat: final changes before public

feat: final changes before public #1

Workflow file for this run

name: Build and Push Influx Image
on:
push:
branches:
- master
paths:
- "apps/influx/**"
- "packages/stratus/**"
- "packages/types/**"
- "package.json"
- "bun.lock"
- ".github/workflows/influx-docker.yml"
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/influx
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
context: .
file: ./apps/influx/Dockerfile
platforms: linux/amd64
push: true
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
cleanup:
needs: build-and-push
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Delete old image versions, keep the two newest
uses: actions/delete-package-versions@v5
with:
package-name: influx
package-type: container
min-versions-to-keep: 2