Files
site-profile/.gitea/workflows/release-image-harbor.yml
2025-03-14 21:04:35 -05:00

57 lines
1.4 KiB
YAML

name: release-image-harbor
on:
push:
tags:
- 0.*
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract Metadata
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=ref,event=branch
type=ref,event=tag
images: ${{ vars.REGISTRY_HOST }}/images
- name: Install Podman
run: |
sudo apt-get update
sudo apt-get install -y podman
- name: Log into Registry
id: log-in
uses: redhat-actions/podman-login@v1
with:
registry: ${{ vars.REGISTRY_HOST }}
username: ${{ vars.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_SECRET }}
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
oci: true
image: ${{ vars.REGISTRY_HOST }}/images
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
containerfiles: |
./Dockerfile
- name: Push Image
id: push-to-gitea
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ vars.REGISTRY_HOST }}