Skip to content

Instantly share code, notes, and snippets.

View joshraker's full-sized avatar

Josh Raker joshraker

View GitHub Profile
@joshraker
joshraker / release.yml
Last active September 3, 2023 01:33
Workflow that creates a tag "release" for a JavaScript GitHub Action after installing `node_modules` so that they don't have to be committed to the main branch.
# Usage: Creates a release with the provided version
# In order to use our JS actions we need to commit node_modules, so we do that
# here and push the result to a version tag for release so that they don't have
# to be committed to the main branch
name: Release
on:
workflow_dispatch:
inputs:
version:
@joshraker
joshraker / setup_logical_replication.sh
Last active August 20, 2020 18:33
Script to set up logical replication between two Aptible Deploy PostgreSQL Databases. Must be run from inside the Stack e.g. in an `aptible ssh` session. Must have `pg_dump` and `psql` >= master version installed.
#!/bin/bash
if [[ $# -ne 2 ]]; then
echo "Usage: $0 master_url replica_url"
exit 1
fi
parse_url()
{
# cf http://stackoverflow.com/a/17287984