Skip to content

Commit

Permalink
new way of chekcing auth
Browse files Browse the repository at this point in the history
  • Loading branch information
nikellepetrillo committed Jan 21, 2025
1 parent c881827 commit 2cce1f5
Show file tree
Hide file tree
Showing 19 changed files with 37 additions and 186 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/authorized_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
id: gatekeeper
run: |
echo "The actor is: ${GITHUB_ACTOR}"
APPROVED_USERS=("nikellepetrilloo") # Add more users as needed
APPROVED_USERS=("nikellepetrillo") # Add more users as needed
if [[ " ${APPROVED_USERS[@]} " =~ " ${GITHUB_ACTOR} " ]]; then
echo "User ${GITHUB_ACTOR} is approved."
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_cram_to_unmapped_bams.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestCramToUnmappedBams:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_exome_germline_single_sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestExomeGermlineSingleSample:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_exome_reprocessing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestExomeReprocessing:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/test_imputation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestImputation:
needs: [check-authorization, authorization-failed]
if: |
always() &&
needs.check-authorization.outputs.approved == 'true' &&
needs.check-authorization.result == 'success'
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_joint_genotyping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestJointGenotyping:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_multisamplesmartseq2singlenucleus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestMultiSampleSmartSeq2SingleNucleus:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_optimus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestOptimus:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_pairedtag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestPairedTag:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_reblockGVCF.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestReblockGVCF:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_rna_with_umis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestRNAWithUMIsPipeline:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_slideseq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestSlideSeq:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_snm3c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
Testsnm3C:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_ultima_genomics_joint_genotyping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestUltimaGenomicsJointGenotyping:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_ultima_genomics_whole_genome_cram_only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
TestUltimaGenomicsWholeGenomeCramOnly:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
run_pipeline:
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_ultima_genomics_whole_genome_germline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestUltimaGenomicsWholeGenomeGermline:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_variant_calling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestVariantCalling:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_whole_genome_germline_single_sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestWholeGenomeGermlineSingleSample:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test_whole_genome_reprocessing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,9 @@ jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

authorization-failed:
needs: check-authorization
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Authorization Failed
run: |
echo "::error::Authorization check failed - unauthorized user"
exit 1
TestWholeGenomeReprocessing:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down

0 comments on commit 2cce1f5

Please sign in to comment.