chore: bump wrappers version to 0.1.19 (#793) #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Package plv8 | |
on: | |
push: | |
branches: | |
- develop | |
paths: | |
- ".github/workflows/package-plv8.yml" | |
- "Dockerfile" | |
env: | |
image: ghcr.io/supabase/plv8 | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
jobs: | |
settings: | |
runs-on: ubuntu-latest | |
outputs: | |
image_tag: ${{ env.image }}:${{ steps.meta.outputs.image_tag }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: meta | |
run: | | |
plv8_release=$(grep -o 'plv8_release=.*' Dockerfile | head -1 | cut -d "=" -f 2) | |
postgresql_major=$(grep -o 'postgresql_major=.*' Dockerfile | head -1 | cut -d "=" -f 2) | |
echo "image_tag=${plv8_release}-pg${postgresql_major}" >> $GITHUB_OUTPUT | |
build_image: | |
needs: settings | |
strategy: | |
matrix: | |
include: | |
- runner: [self-hosted, X64] | |
arch: amd64 | |
- runner: arm-runner | |
arch: arm64 | |
runs-on: ${{ matrix.runner }} | |
timeout-minutes: 180 | |
outputs: | |
image_digest: ${{ steps.build.outputs.digest }} | |
steps: | |
- run: docker context create builders | |
- uses: docker/setup-buildx-action@v3 | |
with: | |
endpoint: builders | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- id: build | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
target: plv8-deb | |
tags: ${{ needs.settings.outputs.image_tag }}_${{ matrix.arch }} | |
platforms: linux/${{ matrix.arch }} | |
no-cache: true | |
merge_manifest: | |
needs: [settings, build_image] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Merge multi-arch manifests | |
run: | | |
docker buildx imagetools create -t ${{ needs.settings.outputs.image_tag }} \ | |
${{ needs.settings.outputs.image_tag }}_amd64 \ | |
${{ needs.settings.outputs.image_tag }}_arm64 |