Skip to content

Commit

Permalink
try on qemu again
Browse files Browse the repository at this point in the history
  • Loading branch information
ChuckHend committed Oct 15, 2024
1 parent ac614c4 commit 16b2447
Show file tree
Hide file tree
Showing 2 changed files with 272 additions and 200 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/extension_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,75 @@ jobs:
env:
TRUNK_API_TOKEN: ${{ secrets.TRUNK_AUTH_TOKEN }}
run: ~/.cargo/bin/trunk publish
build_and_push:
name: Build and push images
env:
TARGET_PLATFORMS: linux/amd64,linux/arm64
runs-on:
- self-hosted
- dind
- xlarge-16x16
outputs:
short_sha: ${{ steps.versions.outputs.SHORT_SHA }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install stoml and pg-trunk
shell: bash
run: |
set -xe
wget https://github.com/freshautomations/stoml/releases/download/v0.7.1/stoml_linux_amd64 &> /dev/null
mv stoml_linux_amd64 stoml
chmod +x stoml
sudo mv stoml /usr/local/bin/
- name: Set version strings
id: versions
run: |
echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "TAG_VER=$(/usr/local/bin/stoml Cargo.toml package.version)" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Quay
uses: docker/login-action@v2
with:
registry: quay.io/tembo
username: ${{ secrets.QUAY_USER_TEMBO }}
password: ${{ secrets.QUAY_PASSWORD_TEMBO }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push -- Commit
if: github.event_name != 'release'
uses: docker/build-push-action@v5
with:
file: ./images/vectorize-pg/Dockerfile
context: .
platforms: linux/amd64, linux/arm64
push: true
tags: |
quay.io/tembo/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}
- name: Build and push -- Release
if: github.event_name == 'release'
uses: docker/build-push-action@v5
with:
file: ./images/vectorize-pg/Dockerfile
context: .
platforms: linux/amd64, linux/arm64
push: true
tags: |
quay.io/tembo/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}
quay.io/tembo/vectorize-pg:latest
Loading

0 comments on commit 16b2447

Please sign in to comment.