-
Notifications
You must be signed in to change notification settings - Fork 64
54 lines (47 loc) · 1.66 KB
/
build-docker-image.yaml
File metadata and controls
54 lines (47 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Build mostlyai Docker Image
on:
workflow_dispatch:
workflow_call:
env:
PLATFORMS: linux/amd64
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Setup | Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with: {fetch-depth: 1}
- name: Setup | Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
with:
cache-binary: false
cleanup: false
platforms: ${{ env.PLATFORMS }}
- name: Setup | Docker Build Metadata
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v.5.10.0
id: meta
with:
images: ghcr.io/mostly-ai/sdk
- name: Setup | Docker Login
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build | Build Docker Image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v6.18.0
env:
BUILDX_NO_DEFAULT_ATTESTATIONS: '1'
DOCKER_BUILD_SUMMARY: 'false'
DOCKER_BUILD_CHECKS_ANNOTATIONS: 'false'
DOCKER_BUILD_RECORD_UPLOAD: 'false'
with:
platforms: ${{ env.PLATFORMS }}
outputs: type=registry,compression=zstd,force-compression=true,oci-mediatypes=true,compression-level=9
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: true