change workflow
This commit is contained in:
@@ -23,34 +23,52 @@ jobs:
|
||||
type=ref,event=tag
|
||||
images: ${{ vars.REPOSITORY_HOST }}/${{ gitea.repository }}
|
||||
|
||||
- name: Install Podman
|
||||
- name: Install QEMU
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y podman
|
||||
sudo apt-get install -y qemu-user-static
|
||||
|
||||
- name: Set up Docker Context for Buildx
|
||||
id: buildx-context
|
||||
run: |
|
||||
export DOCKER_HOST=tcp://docker:2376/
|
||||
export DOCKER_TLS_CERTDIR="/certs"
|
||||
export DOCKER_TLS_VERIFY=0
|
||||
export DOCKER_CERT_PATH="/certs/client"
|
||||
docker context create builders
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
endpoint: builders
|
||||
env:
|
||||
DOCKER_HOST: "tcp://docker:2376/"
|
||||
DOCKER_TLS_CERTDIR: "/certs"
|
||||
DOCKER_TLS_VERIFY: 0
|
||||
DOCKER_CERT_PATH: "/certs/client"
|
||||
|
||||
- name: Available Platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
|
||||
- name: Login to Registry
|
||||
id: log-in
|
||||
uses: redhat-actions/podman-login@v1
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.REPOSITORY_HOST }}
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.REPOSITORY_TOKEN }}
|
||||
|
||||
- name: Build Image
|
||||
id: build-image
|
||||
uses: redhat-actions/buildah-build@v2
|
||||
- name: Build and Push Image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
oci: true
|
||||
image: ${{ vars.REPOSITORY_HOST }}/${{ gitea.repository }}
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/amd64
|
||||
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.REPOSITORY_HOST }}
|
||||
file: ./Dockerfile
|
||||
env:
|
||||
DOCKER_HOST: "tcp://docker:2376/"
|
||||
DOCKER_TLS_CERTDIR: "/certs"
|
||||
DOCKER_TLS_VERIFY: 0
|
||||
DOCKER_CERT_PATH: "/certs/client"
|
||||
|
Reference in New Issue
Block a user