Skip to content

Commit

Permalink
grabbranch name
Browse files Browse the repository at this point in the history
  • Loading branch information
nikellepetrillo committed Dec 12, 2024
1 parent 79d363a commit e6930a3
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/test_illumina_genotyping_array.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ on:

env:
PROJECT_NAME: WARP
# Github repo name
REPOSITORY_NAME: ${{ github.event.repository.name }}
SA_JSON_B64: ${{ secrets.PDT_TESTER_SA_B64 }}
PIPELINE_NAME: IlluminaGenotypingArray
DOCKSTORE_PIPELINE_NAME: IlluminaGenotypingArray


jobs:
Expand All @@ -59,11 +60,6 @@ jobs:
id-token: 'write'

steps:
# Add a step to wait to account for github -> dockstore -> terra delays
- name: Wait Before Starting
run: |
echo "Waiting for 5 minutes before starting..."
sleep 1 # time in seconds, update this when we really want a delay
# actions/checkout MUST come before auth
- uses: actions/checkout@v3
with:
Expand All @@ -74,17 +70,13 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install dependencies
run: |
pwd
cd scripts/firecloud_api/
pip install -r requirements.txt
# Set the branch name.
# github.head_ref contains the name of the branch in the context of a pull request
# if github.head_ref is empty, it implies the workflow was triggered manually
# ${GITHUB_REF##*/} extracts the branch name from GITHUB_REF.
# The ##*/ is a parameter expansion that removes the refs/heads/ prefix, leaving just the branch name.
- name: Set Branch Name
id: set_branch
run: |
Expand All @@ -103,14 +95,15 @@ jobs:
# Capture the output of the script (commit ID)
COMMIT_HASH_FROM_FETCH=$(python scripts/dockstore_api/fetch_dockstore_commit.py \
$DOCKSTORE_TOKEN \
IlluminaGenotypingArray \
$DOCKSTORE_PIPELINE_NAME \
$branch_name)
# Export the commit hash as an environment variable
echo "DOCKSTORE_COMMIT_HASH=$COMMIT_HASH_FROM_FETCH" >> $GITHUB_ENV
env:
##TODO NEED TO ADD DOCKSTORE_TOKEN FOR SERVICE ACCOUNT##
## TODO NEED TO ADD DOCKSTORE_TOKEN FOR SERVICE ACCOUNT ##
DOCKSTORE_TOKEN: ${{ secrets.DOCKSTORE_TOKEN }}
DOCKSTORE_PIPELINE_NAME: ${{ env.DOCKSTORE_PIPELINE_NAME }}
branch_name: ${{ env.branch_name }}

- name: Set Commit Hash
Expand Down

0 comments on commit e6930a3

Please sign in to comment.