ci: build through the runner's podman socket with podman-remote
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 file changed
+7
-5
@@ -16,18 +16,20 @@ env:
|
|||||||
IMAGES: base web
|
IMAGES: base web
|
||||||
TAG: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref_name }}
|
TAG: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref_name }}
|
||||||
PUSH: ${{ github.event_name != 'pull_request' }}
|
PUSH: ${{ github.event_name != 'pull_request' }}
|
||||||
|
CONTAINER_HOST: unix:///var/run/docker.sock
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: job-v2
|
runs-on: podman-test
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- run: dnf install -yq git-core podman-remote
|
||||||
|
- uses: builtin:checkout
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
for image in $IMAGES; do
|
for image in $IMAGES; do
|
||||||
pull=never; [[ $image == base ]] && pull=newer
|
pull=never; [[ $image == base ]] && pull=newer
|
||||||
buildah build --pull="$pull" \
|
podman-remote build --pull="$pull" \
|
||||||
--build-arg TAG="$TAG" \
|
--build-arg TAG="$TAG" \
|
||||||
-t "$REGISTRY/job79/$image:$TAG" "containers/$image"
|
-t "$REGISTRY/job79/$image:$TAG" "containers/$image"
|
||||||
done
|
done
|
||||||
@@ -38,7 +40,7 @@ jobs:
|
|||||||
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
buildah login -u "$REGISTRY_USERNAME" --password-stdin "$REGISTRY" <<<"$REGISTRY_TOKEN"
|
podman-remote login -u "$REGISTRY_USERNAME" --password-stdin "$REGISTRY" <<<"$REGISTRY_TOKEN"
|
||||||
for image in $IMAGES; do
|
for image in $IMAGES; do
|
||||||
buildah push --compression-format=zstd:chunked --compression-level=12 "$REGISTRY/job79/$image:$TAG"
|
podman-remote push --compression-format=zstd:chunked --compression-level=12 "$REGISTRY/job79/$image:$TAG"
|
||||||
done
|
done
|
||||||
Reference in new issue
Block a user