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'
# Conflicts: # inputs/values/dockers.json
- Loading branch information
Showing
58 changed files
with
1,657 additions
and
545 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 |
---|---|---|
|
@@ -2,46 +2,41 @@ name: documentation | |
|
||
on: | ||
pull_request: | ||
branches: [master] | ||
branches: [main] | ||
paths: | ||
- 'website/**' | ||
push: | ||
branches: [master] | ||
branches: [main] | ||
paths: | ||
- 'website/**' | ||
|
||
jobs: | ||
checks: | ||
Test: | ||
if: github.event_name != 'push' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
with: | ||
lfs: 'true' | ||
- name: checkoutLFS | ||
uses: actions/checkout@v2 | ||
run: git lfs pull | ||
- uses: actions/setup-node@v1 | ||
lfs: 'true' | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
- name: Test Build | ||
run: | | ||
cd website | ||
if [ -e yarn.lock ]; then | ||
yarn install --frozen-lockfile | ||
elif [ -e package-lock.json ]; then | ||
npm ci | ||
else | ||
npm i | ||
if [ -e yarn.lock ]; then yarn install --frozen-lockfile; | ||
elif [ -e package-lock.json ]; then npm ci; | ||
else npm i; | ||
fi | ||
npm run build | ||
gh-release: | ||
Deploy: | ||
if: github.event_name != 'pull_request' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
with: | ||
lfs: 'true' | ||
- name: checkoutLFS | ||
uses: actions/checkout@v2 | ||
run: git lfs pull | ||
- uses: actions/setup-node@v1 | ||
lfs: 'true' | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
- name: Release to GitHub Pages | ||
|
@@ -52,12 +47,9 @@ jobs: | |
git config --global user.email "[email protected]" | ||
git config --global user.name "gh-actions" | ||
cd website | ||
if [ -e yarn.lock ]; then | ||
yarn install --frozen-lockfile | ||
elif [ -e package-lock.json ]; then | ||
npm ci | ||
else | ||
npm i | ||
if [ -e yarn.lock ]; then yarn install --frozen-lockfile; | ||
elif [ -e package-lock.json ]; then npm ci; | ||
else npm i; | ||
fi | ||
npx docusaurus build | ||
- name: Deploy | ||
|
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 |
---|---|---|
|
@@ -3,15 +3,15 @@ name: Docker Images | |
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
paths: | ||
- 'src/**' | ||
- 'dockerfiles/**' | ||
- 'scripts/docker/build_docker.py' | ||
- '.github/workflows/sv_pipeline_docker.yml' | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
paths: | ||
- 'src/**' | ||
- 'dockerfiles/**' | ||
|
@@ -43,15 +43,15 @@ jobs: | |
id: commit_sha | ||
# This action determines the SHA of two commits: | ||
# - BASE (BASE_SHA): The commit SHA of the base branch (e.g., | ||
# broadinstitute/gatk-sv:master) which the feature branch targets. | ||
# broadinstitute/gatk-sv:main) which the feature branch targets. | ||
# - HEAD (HEAD_SHA): The commit SHA of the latest commit on the | ||
# feature branch. | ||
# | ||
# In the following example, BASE_SHA=B and HEAD_SHA=Z | ||
# | ||
# X---Y---Z feature | ||
# / \ | ||
# A---B---C---D---E master | ||
# A---B---C---D---E main | ||
# | ||
# 'E' is the merge commit (e.g., 'Merge pull request #0'). | ||
# | ||
|
@@ -155,6 +155,9 @@ jobs: | |
strategy: | ||
matrix: | ||
python-version: ['3.8'] | ||
env: | ||
DOCKERS_AZURE: "./inputs/values/dockers_azure.json" | ||
DOCKERS_GCP: "./inputs/values/dockers.json" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
@@ -203,24 +206,45 @@ jobs: | |
sudo mv "$tmp" /etc/docker/daemon.json | ||
sudo systemctl restart docker.service | ||
- name: Build and Publish Docker Images | ||
- name: Build and Publish Docker Images to 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 }} \ | ||
--gcr-project ${{ secrets.GCP_PROJECT_ID }}/gatk-sv \ | ||
--docker-repo us.gcr.io/${{ secrets.GCP_PROJECT_ID }}/gatk-sv \ | ||
--image-tag ${{ needs.build_args_job.outputs.image_tag }} \ | ||
--prune-after-each-image | ||
CHANGED=$(git diff --quiet ./inputs/values/dockers.json || echo True) | ||
--input-json $DOCKERS_GCP \ | ||
--output-json $DOCKERS_GCP | ||
CHANGED=$(git diff --quiet $DOCKERS_GCP || echo True) | ||
echo "::set-output name=CHANGED::$CHANGED" | ||
- name: Commit Changes to dockers.json | ||
- 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: | | ||
COMMIT_SHA=${{ needs.build_args_job.outputs.head_sha }} | ||
git config --global user.name 'gatk-sv-bot' | ||
git config --global user.email '[email protected]' | ||
git commit ./inputs/values/dockers.json -m "Update docker images list, triggered by "${COMMIT_SHA::8} | ||
git pull --rebase origin master | ||
git commit $DOCKERS_AZURE $DOCKERS_GCP -m "Update docker images list, triggered by "${COMMIT_SHA::8} | ||
git pull --rebase origin main | ||
git push |
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.