create image using tag

This commit is contained in:
Sofiane Gerhardt 2024-10-21 12:37:18 +02:00
parent f95ba7e394
commit f958559a45

View file

@ -3,8 +3,11 @@ run-name: Build and Push container
on:
push:
branches:
- main
tags:
- '^\d+\.\d+\.\d+$'
env:
IMAGE: git.kvant.cloud/phoenix/besu-hpc
jobs:
build_besu:
@ -12,7 +15,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@ -22,3 +25,20 @@ jobs:
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:
platforms: linux/s390x
push: true
context: .
build-args: |
VERSION=${{ github.ref_name }}
image: ${{ env.IMAGE }}
cache-from: |
type=registry,ref=${{ env.IMAGE }}:${{ env.VERSION }}
type=registry,ref=${{ env.IMAGE }}:latest
cache-to: type=inline
tags: |
${{ env.IMAGE }}:${{ env.VERSION }}
${{ env.IMAGE }}:latest