Created
September 4, 2021 01:20
-
-
Save m1yag1/fb82d5bf84006d0c9087322d5179572d to your computer and use it in GitHub Desktop.
Get the latest sha for a git repo within a Concourse task
This file contains 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
--- | |
platform: linux | |
image_resource: | |
type: registry-image | |
source: | |
password: ((ce-dockerhub-token)) | |
repository: alpine/git | |
username: ((ce-dockerhub-id)) | |
inputs: | |
- name: source-code | |
outputs: | |
- name: sha | |
run: | |
path: sh | |
args: | |
- -cxe | |
- | | |
git --git-dir=source-code/.git rev-parse --short HEAD > sha/sha | |
cat sha/sha |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment