fix: switch from docker to podman for Makefile and Gitea Actions workflow
This commit is contained in:
+40
-39
@@ -28,50 +28,51 @@ jobs:
|
||||
# Strip leading 'v' from tag name: v0.0.0-alpha2 -> 0.0.0-alpha2
|
||||
ROC_VERSION="${GITHUB_REF_NAME#v}"
|
||||
echo "roc_version=${ROC_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
echo "ROC_VERSION=${ROC_VERSION}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to registry
|
||||
- name: Log in to container registry
|
||||
env:
|
||||
ROC_VERSION: ${{ steps.version.outputs.roc_version }}
|
||||
run: |
|
||||
echo "$REGISTRY_PASSWORD" | docker login $REGISTRY -u $REGISTRY_USER --password-stdin
|
||||
echo "$REGISTRY_PASSWORD" | podman login $REGISTRY -u $REGISTRY_USER --password-stdin
|
||||
|
||||
- name: Build and push base image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
target: base
|
||||
build-args: ROC_VERSION=${{ steps.version.outputs.roc_version }}
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/roc-tools-base:${{ steps.version.outputs.roc_version }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/roc-tools-base:latest
|
||||
push: true
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
env:
|
||||
ROC_VERSION: ${{ steps.version.outputs.roc_version }}
|
||||
run: |
|
||||
podman build \
|
||||
-f Containerfile \
|
||||
--target base \
|
||||
--build-arg ROC_VERSION="${ROC_VERSION}" \
|
||||
-t "$REGISTRY/$IMAGE_NAMESPACE/roc-tools-base:${ROC_VERSION}" \
|
||||
-t "$REGISTRY/$IMAGE_NAMESPACE/roc-tools-base:latest" \
|
||||
.
|
||||
podman push "$REGISTRY/$IMAGE_NAMESPACE/roc-tools-base:${ROC_VERSION}"
|
||||
podman push "$REGISTRY/$IMAGE_NAMESPACE/roc-tools-base:latest"
|
||||
|
||||
- name: Build and push dev image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
target: dev
|
||||
build-args: ROC_VERSION=${{ steps.version.outputs.roc_version }}
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/roc-tools-dev:${{ steps.version.outputs.roc_version }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/roc-tools-dev:latest
|
||||
push: true
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
env:
|
||||
ROC_VERSION: ${{ steps.version.outputs.roc_version }}
|
||||
run: |
|
||||
podman build \
|
||||
-f Containerfile \
|
||||
--target dev \
|
||||
--build-arg ROC_VERSION="${ROC_VERSION}" \
|
||||
-t "$REGISTRY/$IMAGE_NAMESPACE/roc-tools-dev:${ROC_VERSION}" \
|
||||
-t "$REGISTRY/$IMAGE_NAMESPACE/roc-tools-dev:latest" \
|
||||
.
|
||||
podman push "$REGISTRY/$IMAGE_NAMESPACE/roc-tools-dev:${ROC_VERSION}"
|
||||
podman push "$REGISTRY/$IMAGE_NAMESPACE/roc-tools-dev:latest"
|
||||
|
||||
- name: Build and push ci image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
target: ci
|
||||
build-args: ROC_VERSION=${{ steps.version.outputs.roc_version }}
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/roc-tools-ci:${{ steps.version.outputs.roc_version }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/roc-tools-ci:latest
|
||||
push: true
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
env:
|
||||
ROC_VERSION: ${{ steps.version.outputs.roc_version }}
|
||||
run: |
|
||||
podman build \
|
||||
-f Containerfile \
|
||||
--target ci \
|
||||
--build-arg ROC_VERSION="${ROC_VERSION}" \
|
||||
-t "$REGISTRY/$IMAGE_NAMESPACE/roc-tools-ci:${ROC_VERSION}" \
|
||||
-t "$REGISTRY/$IMAGE_NAMESPACE/roc-tools-ci:latest" \
|
||||
.
|
||||
podman push "$REGISTRY/$IMAGE_NAMESPACE/roc-tools-ci:${ROC_VERSION}"
|
||||
podman push "$REGISTRY/$IMAGE_NAMESPACE/roc-tools-ci:latest"
|
||||
|
||||
Reference in New Issue
Block a user