Skip to content

Commit

Permalink
add branch extraction for both pr and push events
Browse files Browse the repository at this point in the history
rxu17 committed Jan 22, 2025
1 parent aa16dd2 commit 53f9a74
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -139,15 +139,23 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Extract Branch Name
run: |
if [ "$GITHUB_HEAD_REF" != "" ]; then
echo "BRANCH_NAME=$GITHUB_HEAD_REF" >> $GITHUB_ENV
else
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
fi
- name: Pull Public Docker Image from GHCR
run: |
docker pull ghcr.io/sage-bionetworks/genie:${{ github.ref_name }}
docker pull ghcr.io/sage-bionetworks/genie:${{ env.BRANCH_NAME }}
- name: Start Docker Container
run: |
docker run -d --name genie-container \
-e SYNAPSE_AUTH_TOKEN="${{ secrets.SYNAPSE_AUTH_TOKEN }}" \
ghcr.io/sage-bionetworks/genie:${{ github.ref_name }} \
ghcr.io/sage-bionetworks/genie:${{ env.BRANCH_NAME }} \
sh -c "while true; do sleep 1; done"
- name: Run validation in test pipeline

0 comments on commit 53f9a74

Please sign in to comment.