Skip to content

Instantly share code, notes, and snippets.

View em-synth's full-sized avatar

Eduardo Mucelli em-synth

View GitHub Profile
@songbinliu
songbinliu / add.commit.md
Last active September 6, 2023 09:51
Add git commit hash to docker image ENV
#!/bin/bash

echo "SOURCE_COMMIT: $SOURCE_COMMIT"

if [[ -z "$SOURCE_COMMIT" ]]; then
	export SOURCE_COMMIT="${SOURCE_COMMIT:-$(git rev-parse HEAD)}"
	echo "Updating SOURCE_COMMIT from git rev-parse HEAD"