Skip to content

Commit

Permalink
feat: adapt CI/CD for our needs
Browse files Browse the repository at this point in the history
  • Loading branch information
eroan-marie committed Nov 13, 2024
1 parent a1d75bb commit 2fc1ae3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 33 deletions.
27 changes: 8 additions & 19 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- 'update_lockfile.sh'

env:
DOCKER_ORG: pangeo
DOCKER_ORG: datalabs
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}

Expand Down Expand Up @@ -44,13 +44,6 @@ jobs:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
Expand All @@ -60,15 +53,13 @@ jobs:
tags: |
${{env.DOCKER_ORG}}/${{ env.IMAGE }}:master
${{env.DOCKER_ORG}}/${{ env.IMAGE }}:${{env.DOCKER_TAG}}
quay.io/${{env.DOCKER_ORG}}/${{ env.IMAGE }}:master
quay.io/${{env.DOCKER_ORG}}/${{ env.IMAGE }}:${{env.DOCKER_TAG}}
matrix-build:
needs: base-image
strategy:
fail-fast: false
matrix:
IMAGE: [base-notebook, pangeo-notebook, ml-notebook, pytorch-notebook]
IMAGE: [base-notebook, pangeo-notebook, pytorch-notebook]
name: ${{ matrix.IMAGE }}
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -102,12 +93,12 @@ jobs:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}
# - name: Login to Quay.io
# uses: docker/login-action@v3
# with:
# registry: quay.io
# username: ${{ secrets.QUAY_USER }}
# password: ${{ secrets.QUAY_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
Expand All @@ -118,8 +109,6 @@ jobs:
tags: |
${{env.DOCKER_ORG}}/${{ matrix.IMAGE }}:master
${{env.DOCKER_ORG}}/${{ matrix.IMAGE }}:${{env.DOCKER_TAG}}
quay.io/${{env.DOCKER_ORG}}/${{ matrix.IMAGE }}:master
quay.io/${{env.DOCKER_ORG}}/${{ matrix.IMAGE }}:${{env.DOCKER_TAG}}
- name: Inspect Image
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CondaLock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
IMAGE: [base-notebook, pangeo-notebook, ml-notebook, pytorch-notebook]
IMAGE: [base-notebook, pangeo-notebook, pytorch-notebook]
name: ${{ matrix.IMAGE }}
runs-on: ubuntu-latest
timeout-minutes: 180
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
IMAGE: [base-image, base-notebook, pangeo-notebook, ml-notebook, pytorch-notebook]
IMAGE: [base-image, base-notebook, pangeo-notebook, pytorch-notebook]
name: ${{ matrix.IMAGE }}
runs-on: ubuntu-latest
steps:
Expand All @@ -33,21 +33,21 @@ jobs:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}
# - name: Login to Quay.io
# uses: docker/login-action@v3
# with:
# registry: quay.io
# username: ${{ secrets.QUAY_USER }}
# password: ${{ secrets.QUAY_TOKEN }}

- name: Create New DockerHub Tags
run: |
docker buildx imagetools create ${DOCKER_ORG}/${{ matrix.IMAGE }}:master \
-t ${DOCKER_ORG}/${{ matrix.IMAGE }}:latest \
-t ${DOCKER_ORG}/${{ matrix.IMAGE }}:${TAG}
- name: Create New Quay.io Tags
run: |
docker buildx imagetools create quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:master \
-t quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:latest \
-t quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:${TAG}
# - name: Create New Quay.io Tags
# run: |
# docker buildx imagetools create quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:master \
# -t quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:latest \
# -t quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:${TAG}
2 changes: 1 addition & 1 deletion .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
IMAGE: [base-notebook, pangeo-notebook, ml-notebook, pytorch-notebook]
IMAGE: [base-notebook, pangeo-notebook, pytorch-notebook]
name: ${{ matrix.IMAGE }}
runs-on: ubuntu-latest
services:
Expand Down

0 comments on commit 2fc1ae3

Please sign in to comment.