Skip to content

Instantly share code, notes, and snippets.

@Guthers
Guthers / ga_needs_skippable_job.yml
Last active April 18, 2024 07:36
This Gist aims to demonstrate having a github action where a job (job3) depends on a skippable job (job2). Play with the run/if conditions on job2 to check the three important outcomes, success, failure, skipped.
name: Github Action skippable job example
on:
pull_request:
types: [synchronize]
jobs:
job1:
name: Step 1
runs-on: ubuntu-latest
@Guthers
Guthers / gitb.sh
Last active July 27, 2023 03:34
Git Switch to latest branches
#!/usr/bin/env bash
# To use the following command put this at the bottom of your .bashrc then run `gits`
alias git_latest="git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads"
gits() {
top_n=10
if [ $# -eq 1 ] ; then
top_n=$1
fi