Files
concrete/.github/workflows/docker-env.yaml

65 lines
1.8 KiB
YAML

name: Docker image (concretefhe dev/CI)
on:
push:
branches:
- main
paths:
- docker/Dockerfile.concretefhe-env
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows external webhook trigger
repository_dispatch:
types:
- rebuild-docker
jobs:
build_publish:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
name: Build & Push the concretefhe env Docker Image
runs-on: ubuntu-20.04
env:
IMAGE_URL: ghcr.io/zama-ai/concretefhe-env
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.BOT_USERNAME }}
password: ${{ secrets.BOT_TOKEN }}
- name: Build concretefhe-env Image
if: ${{ success() && !cancelled() }}
uses: docker/build-push-action@v2
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
file: docker/Dockerfile.concretefhe-env
push: true
tags: "${{ env.IMAGE_URL }}:latest"
no-cache: true
- name: Slack Notification
if: ${{ always() }}
continue-on-error: true
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
SLACK_ICON: https://pbs.twimg.com/profile_images/1274014582265298945/OjBKP9kn_400x400.png
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: "Publishing Docker Image ${{ env.IMAGE_URL }} \
finished with status ${{ job.status }}"
SLACK_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}