diff --git a/.github/workflows/build-cutadapt.yml b/.github/workflows/build-cutadapt.yml index 96cd6427..e924d711 100644 --- a/.github/workflows/build-cutadapt.yml +++ b/.github/workflows/build-cutadapt.yml @@ -1,6 +1,6 @@ name: Cutadapt CI -# Controls when the workflow will run +# Controls when the workflow will run. on: # Triggers the workflow on push or pull request events but only for the "develop" and "master" branch pull_request: @@ -20,12 +20,13 @@ env: # Region-specific Google Docker repository where GOOGLE_PROJECT/REPOSITORY_NAME can be found DOCKER_REGISTRY: us.gcr.io GCR_PATH: broad-gotc-prod/cutadapt + ACR_PATH: cutadapt TAG: ${{ github.event.inputs.image_tag || github.head_ref || github.ref_name }} # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # The job that builds our container - build: + build-for-gcr: runs-on: ubuntu-latest defaults: run: @@ -56,4 +57,29 @@ jobs: password: ${{ secrets.GCR_CI_KEY }} # Push the image to the Google Docker registry - name: Push image - run: "docker push ${DOCKER_REGISTRY}/${GCR_PATH}:${TAG}" \ No newline at end of file + run: "docker push ${DOCKER_REGISTRY}/${GCR_PATH}:${TAG}" + + build-for-acr: + runs-on: ubuntu-latest + defaults: + run: + working-directory: 3rd-party-tools/cutadapt + steps: + # checkout the repo + - name: 'Checkout GitHub Action' + uses: actions/checkout@v3 + + - name: 'Login via Azure CLI' + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - name: 'Build and push image' + uses: azure/docker-login@v1 + with: + login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }} + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + - run: | + docker build . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/${ACR_PATH}:${TAG} + docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/${ACR_PATH}:${TAG} \ No newline at end of file diff --git a/.github/workflows/build-samtools-dist-bwa.yml b/.github/workflows/build-samtools-dist-bwa.yml index 058cefc2..9b29dae4 100644 --- a/.github/workflows/build-samtools-dist-bwa.yml +++ b/.github/workflows/build-samtools-dist-bwa.yml @@ -1,6 +1,6 @@ name: Samtools Dist BWA Mem 2 Ubuntu CI -# Controls when the workflow will run +# Controls when the workflow will run. on: # Triggers the workflow on push or pull request events but only for the "develop" and "master" branch pull_request: @@ -20,12 +20,13 @@ env: # Region-specific Google Docker repository where GOOGLE_PROJECT/REPOSITORY_NAME can be found DOCKER_REGISTRY: us.gcr.io GCR_PATH: broad-gotc-prod/samtools-dist-bwa + ACR_PATH: samtools-dist-bwa TAG: ${{ github.event.inputs.image_tag || github.head_ref || github.ref_name }} # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # The job that builds our container - build: + build-for-gcr: runs-on: ubuntu-latest defaults: run: @@ -56,4 +57,29 @@ jobs: password: ${{ secrets.GCR_CI_KEY }} # Push the image to the Google Docker registry - name: Push image - run: "docker push ${DOCKER_REGISTRY}/${GCR_PATH}:${TAG}" \ No newline at end of file + run: "docker push ${DOCKER_REGISTRY}/${GCR_PATH}:${TAG}" + + build-for-acr: + runs-on: ubuntu-latest + defaults: + run: + working-directory: 3rd-party-tools/samtools-dist-bwa + steps: + # checkout the repo + - name: 'Checkout GitHub Action' + uses: actions/checkout@v3 + + - name: 'Login via Azure CLI' + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - name: 'Build and push image' + uses: azure/docker-login@v1 + with: + login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }} + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + - run: | + docker build . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/${ACR_PATH}:${TAG} + docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/${ACR_PATH}:${TAG} \ No newline at end of file diff --git a/3rd-party-tools/cutadapt/Dockerfile b/3rd-party-tools/cutadapt/Dockerfile index aca18d05..d37a0bcb 100644 --- a/3rd-party-tools/cutadapt/Dockerfile +++ b/3rd-party-tools/cutadapt/Dockerfile @@ -1,4 +1,4 @@ -# Adding a platform tag to ensure that images built on ARM-based machines doesn't break pipelines +# Adding a platform tag to ensure that images built on ARM-based machines doesn't break pipelines. FROM --platform=linux/amd64 python:3.7.7 LABEL maintainer="DSP Data Centers " diff --git a/3rd-party-tools/samtools-dist-bwa/Dockerfile b/3rd-party-tools/samtools-dist-bwa/Dockerfile index 5b558ce6..f26d612f 100644 --- a/3rd-party-tools/samtools-dist-bwa/Dockerfile +++ b/3rd-party-tools/samtools-dist-bwa/Dockerfile @@ -1,4 +1,4 @@ -# Adding a platform tag to ensure that images built on ARM-based machines doesn't break pipelines +# Adding a platform tag to ensure that images built on ARM-based machines doesn't break pipelines. FROM --platform="linux/amd64" ubuntu:22.04 ENV TERM=xterm-256color