Tutorial and tips for GitHub Actions workflows
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
#!/bin/bash | |
# calculate sha256 hash from a pub key to compare to github deploy key | |
KEY=$1 | |
KEYPATH="~/.ssh/${KEY}.pub" | |
ssh-keygen -E sha256 -l -f "$KEYPATH" |
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
SELECT | |
TIMESTAMP_TRUNC(jobs.start_time, second) as sec, | |
SUM(SAFE_DIVIDE(total_slot_ms, TIMESTAMP_DIFF(end_time, start_time, MILLISECOND))) AS Slot_Count, project_ID as project | |
FROM | |
`region-us`.INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION jobs | |
WHERE jobs.start_time BETWEEN TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 3 DAY) AND CURRENT_TIMESTAMP() | |
GROUP BY project_id, sec | |
ORDER BY sec DESC |
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
Github.com ui .currently does not natively supoport search for multiple topic tags as of now. However their api allows you to query multiple tags. Below is a simple example to query github.com with ecs and go topic tags. | |
curl -H "Accept: application/vnd.github.mercy-preview+json" \ | |
https://api.github.com/search/repositories?q=topic:ecs+topic:go | |
Response from the github can be rather verbose so lets filter only relavant info such repo url and description. | |
curl -H "Accept: application/vnd.github.mercy-preview+json" \ | |
https://api.github.com/search/repositories\?q\=topic:ecs+topic:go | jq '.items[] | {url:.url, description:.description}' |
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
tap "azure/draft" | |
tap "boz/repo" | |
tap "browsh-org/browsh" | |
tap "contribsys/faktory" | |
tap "datawire/blackbird" | |
tap "davrodpin/mole" | |
tap "derailed/k9s" | |
tap "dtan4/dtan4" | |
tap "fishtown-analytics/dbt" | |
tap "fluidkeys/tap" |
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
# Starting Dockerfile for a Java based project in Windows Server Core with JDK integrity check | |
FROM microsoft/windowsservercore | |
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] | |
WORKDIR c:/setup | |
# Set variables for OpenJDK pull | |
ENV JAVA_VERSION="1.8.0.111-3" ` | |
JAVA_ZIP_VERSION="1.8.0-openjdk-1.8.0.111-3.b15" ` | |
JAVA_SHA256="e080371bf57536668416157660e05d95fe04db15da36234d32bda8e301bb0454" ` |
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
// A Declarative Pipeline is defined within a 'pipeline' block. | |
pipeline { | |
// agent defines where the pipeline will run. | |
agent { | |
// This also could have been 'agent any' - that has the same meaning. | |
label "" | |
// Other possible built-in agent types are 'agent none', for not running the | |
// top-level on any agent (which results in you needing to specify agents on | |
// each stage and do explicit checkouts of scm in those stages), 'docker', |
How do I dropdown?
This is how you dropdown.
<details> <summary>How do I dropdown?</summary> <br> This is how you dropdown.
NewerOlder