Update Dockerfile (#28)
* Try to make it impossible to confuse arches * Use GHA cache
This commit is contained in:
22
.github/workflows/cibuild.yml
vendored
22
.github/workflows/cibuild.yml
vendored
@@ -14,7 +14,6 @@ name: Build
|
||||
|
||||
env:
|
||||
CONTAINER_NAME: jordemort/pleroma:${{ github.event.inputs.container_tag || 'latest' }}
|
||||
CACHE_NAME: jordemort/pleroma:cache-unzip
|
||||
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
|
||||
DOCKER_CLI_EXPERIMENTAL: enabled
|
||||
|
||||
@@ -25,34 +24,34 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1.2.0
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1.7.0
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to container registry
|
||||
uses: docker/login-action@v1.14.1
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- uses: actions/checkout@v3.0.2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Pull cached containers
|
||||
run: |
|
||||
docker pull --platform "$PLATFORMS" --quiet "$CONTAINER_NAME" || true
|
||||
docker pull --platform "$PLATFORMS" --quiet "$CACHE_NAME" || true
|
||||
# Needed for buildx gha cache to work
|
||||
- name: Expose GitHub Runtime
|
||||
uses: crazy-max/ghaction-github-runtime@v1
|
||||
|
||||
|
||||
- name: Build and push container
|
||||
run: |
|
||||
buildx_argv=(
|
||||
--pull
|
||||
--build-arg BUILDKIT_INLINE_CACHE=1
|
||||
--platform "$PLATFORMS"
|
||||
--cache-from "$CONTAINER_NAME"
|
||||
--cache-from type=gha
|
||||
--cache-to type=gha,mode=max
|
||||
--tag "$CONTAINER_NAME"
|
||||
)
|
||||
|
||||
@@ -61,7 +60,6 @@ jobs:
|
||||
fi
|
||||
|
||||
set -x
|
||||
docker buildx build "${buildx_argv[@]}" --target unzip .
|
||||
docker buildx build "${buildx_argv[@]}" .
|
||||
|
||||
- uses: sarisia/actions-status-discord@v1
|
||||
|
||||
Reference in New Issue
Block a user