All checks were successful
Build and Push container / build_concierge_backend (push) Successful in 27s
48 lines
No EOL
1.4 KiB
YAML
48 lines
No EOL
1.4 KiB
YAML
name: Build and Push container
|
|
run-name: Build and Push container
|
|
on:
|
|
workflow_dispatch:
|
|
create:
|
|
push:
|
|
env:
|
|
VCS_REF: ${{ github.sha }}
|
|
VERSION: 0.0.1
|
|
IMAGE: git.kvant.cloud/phoenix/docker_tpl
|
|
jobs:
|
|
build_concierge_backend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set current time
|
|
uses: https://github.com/gerred/actions/current-time@master
|
|
id: current_time
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to git.kvant.cloud registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.kvant.cloud
|
|
username: ${{ vars.PHOENIX_PACKAGE_WRITER_USERNAME }}
|
|
password: ${{ secrets.PHOENIX_PACKAGE_WRITER_TOKEN }}
|
|
|
|
- name: Build and push to gitea registry
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
push: true
|
|
context: .
|
|
build-args: |
|
|
BUILD_DATE=${{ steps.current_time.outputs.time }}
|
|
image: ${{ env.IMAGE }}
|
|
cache-from: |
|
|
type=registry,ref=${{ env.IMAGE }}:${{ github.ref_name }}
|
|
type=registry,ref=${{ env.IMAGE }}:latest
|
|
cache-to: type=inline
|
|
tags: |
|
|
${{ env.IMAGE }}:${{ github.ref_name }}
|
|
${{ env.IMAGE }}:latest |