Skip to content

Instantly share code, notes, and snippets.

@Guthers
Guthers / ga_needs_skippable_job.yml
Last active November 12, 2024 07:39
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 / gits.sh
Last active May 16, 2024 01:38
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