mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-03 18:05:50 +02:00
Add build-ci-docker GH Actions workflow
This commit is contained in:
6
.github/ci-docker/Dockerfile
vendored
6
.github/ci-docker/Dockerfile
vendored
@@ -1,4 +1,6 @@
|
||||
FROM ubuntu:noble
|
||||
FROM public.ecr.aws/ubuntu/ubuntu:noble
|
||||
|
||||
ARG VIPS_VERSIONS="8.14 8.15 8.16"
|
||||
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
@@ -40,7 +42,7 @@ RUN \
|
||||
mkdir /root/vips \
|
||||
&& cd /root/vips \
|
||||
&& curl -s -S -L -o vips_releases.json "https://api.github.com/repos/libvips/libvips/releases" \
|
||||
&& for VIPS_VERSION in "8.13" "8.14" "8.15"; do \
|
||||
&& for VIPS_VERSION in $VIPS_VERSIONS; do \
|
||||
mkdir $VIPS_VERSION \
|
||||
&& export VIPS_RELEASE=$(grep -m 1 "\"tag_name\": \"v$VIPS_VERSION." vips_releases.json | sed -E 's/.*"v([^"]+)".*/\1/') \
|
||||
&& echo "Building Vips $VIPS_RELEASE as $VIPS_VERSION" \
|
||||
|
44
.github/workflows/build-ci-docker.yml
vendored
Normal file
44
.github/workflows/build-ci-docker.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Build CI Docker
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
vips_versions:
|
||||
description: 'Whitespace separated list of libvips versions to build'
|
||||
required: true
|
||||
default: "8.14 8.15 8.16"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Generate Docker tag
|
||||
id: tag
|
||||
run: echo "tag=ghcr.io/imgproxy/imgproxy-ci:$(date +%Y%m%d%H%M)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./.github/ci-docker/Dockerfile
|
||||
tags: ${{ steps.tag.outputs.tag }}
|
||||
platforms: linux/amd64
|
||||
build-args: |
|
||||
"VIPS_VERSIONS=${{ github.event.inputs.vips_versions }}"
|
||||
push: true
|
Reference in New Issue
Block a user