Skip to content

Build container

Build container #4

Workflow file for this run

---
name: Build container
env:
OWNER: khiopsml
IMAGE_NAME: ${{ github.event.repository.name }}
# For more details on events that trigger workflows see:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
on:
schedule:
# Weekly, at 07:00 on Monday UTC time
- cron: "0 7 * * 1"
pull_request:
paths:
- ".github/workflows/docker.yml"
- "Dockerfile"
- "gen/**"
- "go.*"
- "main.go"
- "server/**"
- "statik/**"
- "OpenAPI/**"
push:
branches:
- main
paths:
- ".github/workflows/docker.yml"
- "Dockerfile"
- "gen/**"
- "go.*"
- "main.go"
- "server/**"
- "statik/**"
- "OpenAPI/**"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-dev-container:
runs-on: ubuntu-latest
permissions:
packages: write # to write in the Github package registry
steps:
- name: Checkout khiops-server sources
uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Github Packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image and push to GitHub Container Registry
uses: docker/build-push-action@v2
with:
file: ./Dockerfile
tags: ghcr.io/khiopsml/khiops-server/server:latest
push: true
- name: Display the image digest
run: echo ${{ steps.docker_build.outputs.digest }}