Skip to content

add ci

add ci #1

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ main ]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-analytics-docker-image
cancel-in-progress: true
jobs:
build:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v4
with:
submodules: true
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ github.REPOSITORY }}-analytics:latest
# cache-from: type=gha
# cache-to: type=gha,mode=max