-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (44 loc) · 1.17 KB
/
build_container.yaml
File metadata and controls
48 lines (44 loc) · 1.17 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
name: Build and push container image
on:
workflow_call:
inputs:
docker-tag:
required: true
default: dev
type: string
app-version:
required: true
default: dev
type: string
data-version:
required: true
default: dev
type: string
jobs:
build-container:
runs-on: ubuntu-latest
steps:
- name: "Checkout GitHub Action"
uses: actions/checkout@v6
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: "Build image"
uses: docker/build-push-action@v7
with:
context: .
tags: ${{ inputs.docker-tag }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64
provenance: false
sbom: false
build-args: |
app_version=${{ inputs.app-version }}
data_version=${{ inputs.data-version }}