Add GitSHA variable

This commit is contained in:
Carl Pearson
2024-09-11 08:43:58 -06:00
parent e50ff37215
commit ca86caee85
4 changed files with 18 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ jobs:
echo "SLUG=ghcr.io/cwpearson/ytdlp-site" >> $GITHUB_ENV
echo "DATE=$(date +"%Y%m%d_%H%M")" >> $GITHUB_ENV
- name: Build the Docker image
run: docker build . --file Dockerfile --tag "$SLUG:$DATE" --tag "$SLUG:latest"
run: docker build . --file Dockerfile --build-arg GIT_SHA=$(git rev-parse HEAD) --tag "$SLUG:$DATE" --tag "$SLUG:latest"
- name: Publish to GHCR
run: |
echo '${{secrets.GHCR_TOKEN}}' | docker login ghcr.io -u cwpearson --password-stdin