Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/bin/docker-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
eval "docker buildx build $(.github/bin/get-buildx-args "$@" | sed 's/$/ /' | tr -d \\n)"
4 changes: 4 additions & 0 deletions .github/bin/get-buildx-args
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ else
done
fi

# Expose annotations
WEBLATE_VERSION=$(sed -n 's/^ENV WEBLATE_VERSION \(.*\)/\1/p' Dockerfile)
sed -n "s/^LABEL \(org.opencontainers.image.*\)/--annotation \1/p" Dockerfile | sed -e "s/\\\$WEBLATE_VERSION/$WEBLATE_VERSION/"

# Write to local cache unless publishing (not compatible with push)
if [ "$1" != "publish" ] ; then
echo --cache-to "type=local,dest=/tmp/.buildx-cache/$MATRIX_ARCHITECTURE,mode=max"
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/bleeding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Configure Docker build
run: .github/bin/get-buildx-args
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args)
run: .github/bin/docker-build

buildx:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
- name: Configure Docker build
run: .github/bin/get-buildx-args
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args)
run: .github/bin/docker-build

test:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
- name: Adjust bleeding edge image
run: .github/bin/bleeding ${{needs.bleeding.outputs.weblate_sha}} ${{needs.bleeding.outputs.weblate_date}}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Generate configuration
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
- name: Adjust bleeding edge image
run: .github/bin/bleeding ${{needs.bleeding.outputs.weblate_sha}} ${{needs.bleeding.outputs.weblate_date}}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Generate configuration
Expand Down Expand Up @@ -261,7 +261,7 @@ jobs:
- name: Adjust bleeding edge image
run: .github/bin/bleeding ${{needs.bleeding.outputs.weblate_sha}} ${{needs.bleeding.outputs.weblate_date}}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Generate configuration
Expand Down Expand Up @@ -346,7 +346,7 @@ jobs:
- name: Adjust bleeding edge image
run: .github/bin/bleeding ${{needs.bleeding.outputs.weblate_sha}} ${{needs.bleeding.outputs.weblate_date}}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Generate configuration
Expand Down Expand Up @@ -433,7 +433,7 @@ jobs:
- name: Adjust bleeding edge image
run: .github/bin/bleeding ${{needs.bleeding.outputs.weblate_sha}} ${{needs.bleeding.outputs.weblate_date}}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Generate configuration
Expand Down Expand Up @@ -514,7 +514,7 @@ jobs:
- name: Adjust bleeding edge image
run: .github/bin/bleeding ${{needs.bleeding.outputs.weblate_sha}} ${{needs.bleeding.outputs.weblate_date}}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Generate configuration
Expand Down Expand Up @@ -600,7 +600,7 @@ jobs:
- name: Adjust bleeding edge image
run: .github/bin/bleeding ${{needs.bleeding.outputs.weblate_sha}} ${{needs.bleeding.outputs.weblate_date}}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Checkout the code
Expand Down Expand Up @@ -649,7 +649,7 @@ jobs:
- name: Adjust bleeding edge image
run: .github/bin/bleeding ${{needs.bleeding.outputs.weblate_sha}} ${{needs.bleeding.outputs.weblate_date}}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Checkout the code
Expand Down Expand Up @@ -717,7 +717,7 @@ jobs:
- name: Configure Docker build
run: .github/bin/get-buildx-args publish-bleeding
- name: Publish the Docker images
run: docker buildx build $(.github/bin/get-buildx-args publish-bleeding)
run: .github/bin/docker-build publish-bleeding

push_github:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -773,4 +773,4 @@ jobs:
- name: Configure Docker build
run: .github/bin/get-buildx-args publish-bleeding
- name: Publish the Docker images
run: docker buildx build $(.github/bin/get-buildx-args publish-bleeding)
run: .github/bin/docker-build publish-bleeding
24 changes: 12 additions & 12 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Configure Docker build
run: .github/bin/get-buildx-args
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args)
run: .github/bin/docker-build

buildx:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Configure Docker build
run: .github/bin/get-buildx-args
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args)
run: .github/bin/docker-build

test:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
path: /tmp/.buildx-cache/${{ matrix.architecture }}
key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.architecture }}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Generate configuration
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
path: /tmp/.buildx-cache/${{ matrix.architecture }}
key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.architecture }}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Generate configuration
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
path: /tmp/.buildx-cache/${{ matrix.architecture }}
key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.architecture }}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Generate configuration
Expand Down Expand Up @@ -312,7 +312,7 @@ jobs:
path: /tmp/.buildx-cache/${{ matrix.architecture }}
key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.architecture }}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Generate configuration
Expand Down Expand Up @@ -395,7 +395,7 @@ jobs:
path: /tmp/.buildx-cache/${{ matrix.architecture }}
key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.architecture }}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Generate configuration
Expand Down Expand Up @@ -472,7 +472,7 @@ jobs:
path: /tmp/.buildx-cache/${{ matrix.architecture }}
key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.architecture }}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Generate configuration
Expand Down Expand Up @@ -555,7 +555,7 @@ jobs:
path: /tmp/.buildx-cache/${{ matrix.architecture }}
key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.architecture }}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Checkout the code
Expand Down Expand Up @@ -601,7 +601,7 @@ jobs:
path: /tmp/.buildx-cache/${{ matrix.architecture }}
key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.architecture }}
- name: Build the Docker image
run: docker buildx build $(.github/bin/get-buildx-args load)
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Checkout the code
Expand Down Expand Up @@ -666,7 +666,7 @@ jobs:
- name: Configure Docker build
run: .github/bin/get-buildx-args publish
- name: Publish the Docker images
run: docker buildx build $(.github/bin/get-buildx-args publish)
run: .github/bin/docker-build publish

push_github:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -719,4 +719,4 @@ jobs:
- name: Configure Docker build
run: .github/bin/get-buildx-args publish
- name: Publish the Docker images
run: docker buildx build $(.github/bin/get-buildx-args publish)
run: .github/bin/docker-build publish