feat: multiple versions for the timescaledb-apache extension #2836
Workflow file for this run
This file contains hidden or 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: Nix CI | |
on: | |
push: | |
branches: | |
- develop | |
- release/* | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
build-run-image: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- runner: large-linux-x86 | |
arch: amd64 | |
- runner: large-linux-arm | |
arch: arm64 | |
- runner: macos-latest-xlarge | |
arch: arm64 | |
runs-on: ${{ matrix.runner }} | |
timeout-minutes: 180 | |
steps: | |
- name: Checkout Repo | |
uses: supabase/postgres/.github/actions/shared-checkout@HEAD | |
- name: aws-creds | |
uses: aws-actions/configure-aws-credentials@v4 | |
if: ${{ github.secret_source == 'Actions' }} | |
with: | |
role-to-assume: ${{ secrets.DEV_AWS_ROLE }} | |
aws-region: "us-east-1" | |
output-credentials: true | |
role-duration-seconds: 7200 | |
- name: write secret key | |
# use python so we don't interpolate the secret into the workflow logs, in case of bugs | |
run: | | |
python -c "import os; file = open('nix-secret-key', 'w'); file.write(os.environ['NIX_SIGN_SECRET_KEY']); file.close()" | |
env: | |
NIX_SIGN_SECRET_KEY: ${{ secrets.NIX_SIGN_SECRET_KEY }} | |
- name: Setup cache script | |
if: ${{ github.secret_source == 'Actions' }} | |
run: | | |
sudo mkdir -p /etc/nix | |
cat << 'EOF' | sudo tee /etc/nix/upload-to-cache.sh > /dev/null | |
#!/usr/bin/env bash | |
set -eouf | |
export IFS=' ' | |
echo /nix/var/nix/profiles/default/bin/nix copy --to 's3://nix-postgres-artifacts?secret-key=nix-secret-key' \$OUT_PATHS | |
EOF | |
sudo chmod +x /etc/nix/upload-to-cache.sh | |
- name: Install nix | |
uses: DeterminateSystems/nix-installer-action@main | |
if: ${{ github.secret_source == 'Actions' }} | |
with: | |
extra-conf: | | |
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com | |
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | |
post-build-hook = /etc/nix/upload-to-cache.sh | |
- name: Install nix | |
uses: DeterminateSystems/nix-installer-action@main | |
if: ${{ github.secret_source == 'None' }} | |
with: | |
extra-conf: | | |
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com | |
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
env: | |
AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} | |
AWS_SESSION_TOKEN: ${{ env.AWS_SESSION_TOKEN }} |