Skip to content

Commit

Permalink
set branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaLRussell committed Aug 9, 2024
1 parent b18a672 commit 5b141e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker-sha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- '*'

name: Docker build and push SHA
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
build-and-push:
runs-on: ubuntu-latest
Expand Down
8 changes: 6 additions & 2 deletions docker/common
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/usr/bin/env bash
set -ex

GIT_SHA=$(git -C "$PACKAGE_ROOT" rev-parse --short=7 HEAD)
GIT_BRANCH=$(git -C "$PACKAGE_ROOT" symbolic-ref --short HEAD)
GIT_SHA=$(git rev-parse --short=7 HEAD)
if [[ -v "BRANCH_NAME" ]]; then
GIT_BRANCH=${BRANCH_NAME}
else
GIT_BRANCH=$(git symbolic-ref --short HEAD)
fi

REGISTRY=ghcr.io
ORG=jameel-institute
Expand Down

0 comments on commit 5b141e6

Please sign in to comment.