forked from broadinstitute/gatk-sv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into workflow_bug2
- Loading branch information
Showing
126 changed files
with
6,049 additions
and
5,242 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -30,7 +30,7 @@ jobs: | |
image_tag: ${{ steps.image_tag.outputs.IMAGE_TAG }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
# By default, this checks out only the current commit; | ||
# however, since a diff between the current commit and | ||
|
@@ -79,8 +79,8 @@ jobs: | |
echo "::debug::HEAD_SHA: $HEAD_SHA" | ||
# Avail the determined commit SHAs to other steps. | ||
echo "::set-output name=BASE_SHA::$BASE_SHA" | ||
echo "::set-output name=HEAD_SHA::$HEAD_SHA" | ||
echo "BASE_SHA=$BASE_SHA" >> $GITHUB_OUTPUT | ||
echo "HEAD_SHA=$HEAD_SHA" >> $GITHUB_OUTPUT | ||
- name: Compose Image Tag | ||
id: image_tag | ||
|
@@ -106,7 +106,7 @@ jobs: | |
IMAGE_TAG=$DATE-$RELEASE_TAG-${COMMIT_SHA::8} | ||
echo "::debug::Image tag: $IMAGE_TAG" | ||
echo "::set-output name=IMAGE_TAG::$IMAGE_TAG" | ||
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_OUTPUT | ||
build_job: | ||
runs-on: ubuntu-20.04 | ||
|
@@ -118,7 +118,7 @@ jobs: | |
python-version: ['3.8'] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
# See the comment on build_args_job. | ||
fetch-depth: 0 | ||
|
@@ -128,11 +128,6 @@ jobs: | |
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install termcolor | ||
- name: Run build_docker.py | ||
run: | | ||
cd ./scripts/docker/ | ||
|
@@ -160,22 +155,24 @@ jobs: | |
DOCKERS_GCP: "./inputs/values/dockers.json" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
# See the comment on build_args_job. | ||
fetch-depth: 0 | ||
# Authenticates git using the bot's access token. | ||
token: ${{ secrets.BOT_PAT }} | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install termcolor | ||
- name: Azure login | ||
uses: azure/docker-login@v1 | ||
with: | ||
login-server: ${{ secrets.AZ_CR }} | ||
username: ${{ secrets.AZ_USERNAME }} | ||
password: ${{ secrets.AZ_PASSWORD }} | ||
|
||
- name: Setup gcloud CLI | ||
uses: google-github-actions/[email protected] | ||
|
@@ -206,39 +203,21 @@ jobs: | |
sudo mv "$tmp" /etc/docker/daemon.json | ||
sudo systemctl restart docker.service | ||
- name: Build and Publish Docker Images to GCR | ||
- name: Build and Publish Docker Images to ACR & GCR | ||
id: build_and_publish | ||
run: | | ||
python ./scripts/docker/build_docker.py \ | ||
--base-git-commit ${{ needs.build_args_job.outputs.base_sha }} \ | ||
--current-git-commit ${{ needs.build_args_job.outputs.head_sha }} \ | ||
--docker-repo us.gcr.io/${{ secrets.GCP_PROJECT_ID }}/gatk-sv \ | ||
--image-tag ${{ needs.build_args_job.outputs.image_tag }} \ | ||
--input-json $DOCKERS_GCP \ | ||
--output-json $DOCKERS_GCP | ||
--input-json $DOCKERS_AZURE $DOCKERS_GCP \ | ||
--output-json $DOCKERS_AZURE $DOCKERS_GCP \ | ||
--disable-git-protect | ||
CHANGED=$(git diff --quiet $DOCKERS_GCP || echo True) | ||
echo "::set-output name=CHANGED::$CHANGED" | ||
- name: Azure login | ||
uses: azure/docker-login@v1 | ||
with: | ||
login-server: ${{ secrets.AZ_CR }} | ||
username: ${{ secrets.AZ_USERNAME }} | ||
password: ${{ secrets.AZ_PASSWORD }} | ||
|
||
- name: Build and Publish Docker Images to ACR | ||
run: | | ||
python ./scripts/docker/build_docker.py \ | ||
--base-git-commit ${{ needs.build_args_job.outputs.base_sha }} \ | ||
--current-git-commit ${{ needs.build_args_job.outputs.head_sha }} \ | ||
--docker-repo ${{ secrets.AZ_CR }} \ | ||
--image-tag ${{ needs.build_args_job.outputs.image_tag }} \ | ||
--input-json $DOCKERS_AZURE \ | ||
--output-json $DOCKERS_AZURE \ | ||
--prune-after-each-image \ | ||
--disable-git-protect | ||
- name: Commit Changes to dockers_*.json | ||
if: steps.build_and_publish.outputs.CHANGED | ||
run: | | ||
|
@@ -247,4 +226,9 @@ jobs: | |
git config --global user.email '[email protected]' | ||
git commit $DOCKERS_AZURE $DOCKERS_GCP -m "Update docker images list, triggered by "${COMMIT_SHA::8} | ||
git pull --rebase origin main | ||
git push | ||
# In the following, force-push is required when the above rebase updates the branch; | ||
# otherwise, the push will be rejected with the following error: | ||
# > Updates were rejected because the tip of your current branch is behind ts remote counterpart. | ||
# See this thread for details: https://stackoverflow.com/q/39399804 | ||
git push -f |
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
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.