Skip to content

Commit

Permalink
comment out docker artifact creation
Browse files Browse the repository at this point in the history
  • Loading branch information
savente93 committed Sep 26, 2024
1 parent dcec08b commit ddbee90
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 82 deletions.
87 changes: 43 additions & 44 deletions .github/workflows/create-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,53 +78,53 @@ jobs:
path: docs/_build


docker:
runs-on: ubuntu-latest
outputs:
url: ${{ steps.upload-docker-release-artifacts.outputs.artifact-url }}
if: ${{ github.event_name == 'push' || github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub to check credentials
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and export
uses: docker/build-push-action@v6
with:
outputs: type=docker,dest=/tmp/hydromt-docker-image.tar
tags: hydromt

- name: Run Tests
run: |
docker load --input /tmp/hydromt-docker-image.tar
docker run --env NUMBA_DISABLE_JIT=1 --rm hydromt
- name: Test Binder integration with repo2docker
run: |
pip install jupyter-repo2docker
repo2docker . echo 'success!'
- name: Upload artifact
uses: actions/upload-artifact@v4
id: upload-docker-release-artifacts
with:
name: hydromt-docker-image
path: /tmp/hydromt-docker-image.tar
# docker:
# runs-on: ubuntu-latest
# outputs:
# url: ${{ steps.upload-docker-release-artifacts.outputs.artifact-url }}
# if: ${{ github.event_name == 'push' || github.event.workflow_run.conclusion == 'success' }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3

# - name: Login to Docker Hub to check credentials
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Build and export
# uses: docker/build-push-action@v6
# with:
# outputs: type=docker,dest=/tmp/hydromt-docker-image.tar
# tags: hydromt

# - name: Run Tests
# run: |
# docker load --input /tmp/hydromt-docker-image.tar
# docker run --env NUMBA_DISABLE_JIT=1 --rm hydromt

# - name: Test Binder integration with repo2docker
# run: |
# pip install jupyter-repo2docker
# repo2docker . echo 'success!'


# - name: Upload artifact
# uses: actions/upload-artifact@v4
# id: upload-docker-release-artifacts
# with:
# name: hydromt-docker-image
# path: /tmp/hydromt-docker-image.tar

notify:
needs:
- pypi
- docs
- docker
# - docker
runs-on: ubuntu-24.04
steps:
- name: Checkout
Expand All @@ -134,12 +134,11 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
pypi_url: ${{needs.pypi.outputs.url}}
docker_url: ${{needs.docker.outputs.url}}
# docker_url: ${{needs.docker.outputs.url}}
docs_url: ${{needs.docs.outputs.url}}
run: |
echo "The new release artifacts have been generated and tested. You can download and inspect them if you want by using the links below: " > comment.txt
echo " - pypi: $pypi_url" >> comment.txt
echo " - docker: $docker_url" >> comment.txt
echo " - docs: $docs_url" >> comment.txt
export PR_ID=$(gh pr list --state "open" --author "app/github-actions" --search "release" --json "number" --jq '. | first | .number')
Expand Down
76 changes: 38 additions & 38 deletions .github/workflows/finish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,47 @@ on:
- 'release/**'

jobs:
publish-docker:
if: github.event.pull_request.merged == true
name: Finalise docker (${{ matrix.flavour }}) release
runs-on: ubuntu-24.04 # latest LTS release
strategy:
fail-fast: false
matrix:
flavour: ['min','slim','full']
concurrency:
group: NEW_RELEASE_DOCKER
cancel-in-progress: false # don't abort while we might be creating a PR or something
steps:
- uses: actions/checkout@v4
name: Checkout code
# publish-docker:
# if: github.event.pull_request.merged == true
# name: Finalise docker (${{ matrix.flavour }}) release
# runs-on: ubuntu-24.04 # latest LTS release
# strategy:
# fail-fast: false
# matrix:
# flavour: ['min','slim','full']
# concurrency:
# group: NEW_RELEASE_DOCKER
# cancel-in-progress: false # don't abort while we might be creating a PR or something
# steps:
# - uses: actions/checkout@v4
# name: Checkout code

- uses: actions/download-artifact@v4
with:
name: hydromt-docker-image
# - uses: actions/download-artifact@v4
# with:
# name: hydromt-docker-image

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push ${{ matrix.flavour }} image
uses: docker/build-push-action@v6
with:
context: .
target: ${{ matrix.flavour }}
push: true
tags: deltares/hydromt:${{ env.version }}-${{ matrix.flavour }}
# - name: Build and push ${{ matrix.flavour }} image
# uses: docker/build-push-action@v6
# with:
# context: .
# target: ${{ matrix.flavour }}
# push: true
# tags: deltares/hydromt:${{ env.version }}-${{ matrix.flavour }}

- name: Build and push latest image
if: matrix.flavour == 'slim'
uses: docker/build-push-action@v6
with:
context: .
target: ${{ matrix.flavour }}
push: true
tags: deltares/hydromt:${{ env.version }}, deltares/hydromt:latest
# - name: Build and push latest image
# if: matrix.flavour == 'slim'
# uses: docker/build-push-action@v6
# with:
# context: .
# target: ${{ matrix.flavour }}
# push: true
# tags: deltares/hydromt:${{ env.version }}, deltares/hydromt:latest

publish-pypi:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:

gh-release:
needs:
- publish-docker
# - publish-docker
- publish-pypi
- publish-docs
runs-on: ubuntu-latest
Expand Down

0 comments on commit ddbee90

Please sign in to comment.