-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,227 additions
and
467 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @Sage-Bionetworks/genie_admins |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Build and Push Docker Images | ||
|
||
on: | ||
push: | ||
branches: [develop, 'GEN*', 'gen*'] | ||
paths: | ||
- 'scripts/**' | ||
- '.github/workflows/build-docker-images.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_references_docker: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
module: ["references", "table_updates", "uploads"] # Define the modules you want to loop through for builds | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: sage-bionetworks/genie-bpc-pipeline | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Setup Docker buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Fetch the default branch (develop) for comparison | ||
run: git fetch origin develop:refs/remotes/origin/develop --depth=1 | ||
|
||
- name: Check for Changes in scripts/${{ matrix.module }} | ||
id: check_changes | ||
run: | | ||
# Determine the correct DIFF_BASE | ||
if [ "${{ github.ref_name }}" = "develop" ]; then | ||
# On the develop branch, compare with the previous commit (HEAD^) | ||
DIFF_BASE="HEAD^" | ||
else | ||
# On feature branches, compare with origin/develop | ||
if git merge-base --is-ancestor origin/develop HEAD; then | ||
DIFF_BASE="origin/develop" | ||
else | ||
DIFF_BASE=$(git rev-list --max-parents=0 HEAD) # Use the initial commit as fallback | ||
fi | ||
fi | ||
# Compare changes between DIFF_BASE and HEAD | ||
if git diff --name-only $DIFF_BASE -- scripts/${{ matrix.module }} | grep -q .; then | ||
echo "CHANGED=true" >> $GITHUB_ENV | ||
else | ||
echo "CHANGED=false" >> $GITHUB_ENV | ||
fi | ||
- name: Log in to GitHub Container Registry | ||
if: env.CHANGED == 'true' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and Push Docker Image for scripts/${{ matrix.module }} | ||
if: env.CHANGED == 'true' | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: scripts/${{ matrix.module }} | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.module }}-${{ github.ref_name }} | ||
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.module }}-${{ github.ref_name }}-cache | ||
cache-to: type=inline,mode=max | ||
|
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ process run_quac_upload_report_error { | |
debug true | ||
|
||
input: | ||
val previous | ||
val cohort | ||
|
||
output: | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
Updates the potential pHI fields table with any new variables to redact | ||
*/ | ||
process update_potential_phi_fields_table { | ||
|
||
container "$params.references_docker" | ||
secret 'SYNAPSE_AUTH_TOKEN' | ||
debug true | ||
|
||
input: | ||
val comment | ||
val production | ||
|
||
output: | ||
stdout | ||
|
||
script: | ||
if (production) { | ||
""" | ||
cd /usr/local/src/myscripts/ | ||
Rscript update_potential_phi_fields_table.R -c $comment --production | ||
""" | ||
} | ||
else { | ||
""" | ||
cd /usr/local/src/myscripts/ | ||
Rscript update_potential_phi_fields_table.R -c $comment | ||
""" | ||
} | ||
} |
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
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
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
Oops, something went wrong.