Skip to content

Update librsvg to 2.58.0 and gdk-pixbuf to 2.42.9 #68

Update librsvg to 2.58.0 and gdk-pixbuf to 2.42.9

Update librsvg to 2.58.0 and gdk-pixbuf to 2.42.9 #68

Workflow file for this run

name: Build Docker Layer
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Variables
id: vars
run: |
librsvg_version=$(cat Dockerfile | grep -Po '(?<=LIBRSVG_VERSION\=)(\d{1,3}.\d{1,3}.\d{1,3})')
sha_short=$(git rev-parse --short HEAD)
echo "::set-output name=librsvg_version::$librsvg_version"
echo "::set-output name=sha_short::$sha_short"
release_exists="true"
git show-ref --tags --quiet --verify -- "refs/tags/$librsvg_version" || release_exists="false"
echo "::set-output name=release_exists::$release_exists"
if [[ "$GITHUB_EVENT_NAME" == "push" ]] && [[ "$GITHUB_REF" == "refs/heads/master" ]]
then
echo "::set-output name=deploy::true"
echo "::set-output name=docker_tags::dev,latest,$librsvg_version,sha-$sha_short"
else
echo "::set-output name=deploy::false"
echo "::set-output name=docker_tags::dev,sha-$sha_short"
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: bubblydoo/amazon-linux-librsvg-layer
tag-custom: ${{ steps.vars.outputs.docker_tags }}
tag-custom-only: true
- name: Login to Docker Hub
if: steps.vars.outputs.deploy == 'true'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: ${{ steps.vars.outputs.deploy == 'true' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
- name: Copy artifacts
run: |
docker run --platform linux/amd64 -v "${{ github.workspace }}/dist":/dist bubblydoo/amazon-linux-librsvg-layer:dev &&
docker run --platform linux/arm64 -v "${{ github.workspace }}/dist":/dist bubblydoo/amazon-linux-librsvg-layer:dev
- name: Upload artifacts x86_64
uses: actions/upload-artifact@v2
with:
name: librsvg-lambda-layer.zip
path: dist/librsvg-layer.x86_64.zip
if-no-files-found: error
- name: Upload artifacts aarch64
uses: actions/upload-artifact@v2
with:
name: librsvg-lambda-layer.zip
path: dist/librsvg-layer.aarch64.zip
if-no-files-found: error
- name: Create release
if: ${{ steps.vars.outputs.deploy == 'true' && steps.vars.outputs.release_exists == 'false' }}
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.vars.outputs.librsvg_version }}
release_name: Version ${{ steps.vars.outputs.librsvg_version }}
draft: false
prerelease: false
- name: Upload release asset x86_64
if: ${{ steps.vars.outputs.deploy == 'true' && steps.vars.outputs.release_exists == 'false' }}
id: upload_release_asset_x86_64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/librsvg-layer.x86_64.zip
asset_name: librsvg-lambda-layer.x86_64.zip
asset_content_type: application/zip
- name: Upload release asset aarch64
if: ${{ steps.vars.outputs.deploy == 'true' && steps.vars.outputs.release_exists == 'false' }}
id: upload_release_asset_aarch64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/librsvg-layer.aarch64.zip
asset_name: librsvg-lambda-layer.aarch64.zip
asset_content_type: application/zip