improve metadata
All checks were successful
Build and Push container / build_concierge_backend (push) Successful in 33s
All checks were successful
Build and Push container / build_concierge_backend (push) Successful in 33s
This commit is contained in:
parent
63c93b9a1f
commit
5fcb139c25
1 changed files with 39 additions and 13 deletions
52
.github/workflows/build.yaml
vendored
52
.github/workflows/build.yaml
vendored
|
@ -2,12 +2,20 @@ name: Build and Push container
|
||||||
run-name: Build and Push container
|
run-name: Build and Push container
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
create:
|
#schedule:
|
||||||
|
# - cron: "0 10 * * *"
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
- 'master'
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
- 'master'
|
||||||
env:
|
env:
|
||||||
VCS_REF: ${{ github.sha }}
|
IMAGE: git.kvant.cloud/${{github.repository}}
|
||||||
VERSION: 0.0.1
|
|
||||||
IMAGE: git.kvant.cloud/phoenix/docker_tpl
|
|
||||||
jobs:
|
jobs:
|
||||||
build_concierge_backend:
|
build_concierge_backend:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -30,19 +38,37 @@ jobs:
|
||||||
registry: git.kvant.cloud
|
registry: git.kvant.cloud
|
||||||
username: ${{ vars.PHOENIX_PACKAGE_WRITER_USERNAME }}
|
username: ${{ vars.PHOENIX_PACKAGE_WRITER_USERNAME }}
|
||||||
password: ${{ secrets.PHOENIX_PACKAGE_WRITER_TOKEN }}
|
password: ${{ secrets.PHOENIX_PACKAGE_WRITER_TOKEN }}
|
||||||
|
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
# list of Docker images to use as base name for tags
|
||||||
|
images: |
|
||||||
|
${{env.IMAGE}}
|
||||||
|
# generate Docker tags based on the following events/attributes
|
||||||
|
tags: |
|
||||||
|
type=schedule
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=pr
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=semver,pattern={{major}}
|
||||||
|
type=sha
|
||||||
|
|
||||||
- name: Build and push to gitea registry
|
- name: Build and push to gitea registry
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
push: true
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
context: .
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
context: .
|
||||||
|
provenance: mode=max
|
||||||
|
sbom: true
|
||||||
build-args: |
|
build-args: |
|
||||||
BUILD_DATE=${{ steps.current_time.outputs.time }}
|
BUILD_DATE=${{ steps.current_time.outputs.time }}
|
||||||
image: ${{ env.IMAGE }}
|
|
||||||
cache-from: |
|
cache-from: |
|
||||||
|
type=registry,ref=${{ env.IMAGE }}:buildcache
|
||||||
type=registry,ref=${{ env.IMAGE }}:${{ github.ref_name }}
|
type=registry,ref=${{ env.IMAGE }}:${{ github.ref_name }}
|
||||||
type=registry,ref=${{ env.IMAGE }}:latest
|
type=registry,ref=${{ env.IMAGE }}:main
|
||||||
cache-to: type=inline
|
cache-to: type=registry,ref=${{ env.IMAGE }}:buildcache,mode=max,image-manifest=true
|
||||||
tags: |
|
|
||||||
${{ env.IMAGE }}:${{ github.ref_name }}
|
|
||||||
${{ env.IMAGE }}:latest
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue