Skip to content

Commit

Permalink
Automated publication of zooproject-ml4eo images
Browse files Browse the repository at this point in the history
  • Loading branch information
gfenoy committed May 25, 2023
1 parent 27810b9 commit 16c0248
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/docker-ml4eo-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Docker Image CI (Ubuntu Jammy)

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-osgeolive-cache
key: ${{ runner.os }}-buildx-ml4eo-${{ github.sha }}
restore-keys: ${{ runner.os }}-buildx-ml4eo-
- name: docker login
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
file: Dockerfile-OTBTF
tags: zooproject/zooproject:ml4eo-${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-ml4eo-cache
cache-to: type=local,dest=/tmp/.buildx-ml4eo-cache-new,mode=max
- name: Move cache
run: |
rm -rf /tmp/.buildx-ml4eo-cache
mv /tmp/.buildx-ml4eo-cache-new /tmp/.buildx-ml4eo-cache
- name: Build and push ml4eo-latest
uses: docker/build-push-action@v2
with:
context: .
push: true
file: Dockerfile-OTBTF
tags: zooproject/zooproject:ml4eo-latest
cache-from: type=local,src=/tmp/.buildx-ml4eo-cache
cache-to: type=local,dest=/tmp/.buildx-ml4eo-cache-new,mode=max

0 comments on commit 16c0248

Please sign in to comment.