use buildah

This commit is contained in:
2025-03-14 20:58:33 -05:00
parent 4f826e8964
commit 4c1ec680a9
2 changed files with 36 additions and 20 deletions

View File

@@ -23,21 +23,29 @@ jobs:
type=ref,event=tag type=ref,event=tag
images: ${{ vars.REPOSITORY_HOST }}/${{ gitea.repository }} images: ${{ vars.REPOSITORY_HOST }}/${{ gitea.repository }}
- name: Log into Container Registry - name: Log into Registry
uses: docker/login-action@v3 id: log-in
uses: redhat-actions/podman-login@v1
with: with:
registry: ${{ vars.REPOSITORY_HOST }} registry: ${{ vars.REPOSITORY_HOST }}
username: ${{ gitea.actor }} username: ${{ gitea.actor }}
password: ${{ secrets.REPOSITORY_TOKEN }} password: ${{ secrets.REPOSITORY_TOKEN }}
- name: Set up Docker Buildx - name: Build Image
uses: docker/setup-buildx-action@v3 id: build-image
uses: redhat-actions/buildah-build@v2
- name: Build and Push Image
uses: docker/build-push-action@v6
with: with:
context: . oci: true
push: true image: ${{ vars.REPOSITORY_HOST }}/${{ gitea.repository }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
file: ./Dockerfile 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.REPOSITORY_HOST }}

View File

@@ -23,21 +23,29 @@ jobs:
type=ref,event=tag type=ref,event=tag
images: ${{ vars.REGISTRY_HOST }}/images images: ${{ vars.REGISTRY_HOST }}/images
- name: Log into Container Registry - name: Log into Registry
uses: docker/login-action@v3 id: log-in
uses: redhat-actions/podman-login@v1
with: with:
registry: ${{ vars.REGISTRY_HOST }} registry: ${{ vars.REGISTRY_HOST }}
username: ${{ vars.REGISTRY_USER }} username: ${{ vars.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_SECRET }} password: ${{ secrets.REGISTRY_SECRET }}
- name: Set up Docker Buildx - name: Build Image
uses: docker/setup-buildx-action@v3 id: build-image
uses: redhat-actions/buildah-build@v2
- name: Build and Push Image
uses: docker/build-push-action@v6
with: with:
context: . oci: true
push: true image: ${{ vars.REGISTRY_HOST }}/images
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
file: ./Dockerfile 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 }}