[Snyk] Security upgrade ubuntu from jammy-20240227 to jammy-20240427 #69
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
name: Docker Image CI (MDL4EO) | |
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-mdl4eo-cache | |
key: ${{ runner.os }}-buildx-mdl4eo-${{ github.sha }} | |
restore-keys: ${{ runner.os }}-buildx-mdl4eo- | |
- 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@v4 | |
with: | |
context: . | |
push: true | |
file: docker/mdl4eo/Dockerfile | |
tags: zooproject/zoo-project:mdl4eo-${{ github.sha }} | |
cache-from: type=local,src=/tmp/.buildx-mdl4eo-cache | |
cache-to: type=local,dest=/tmp/.buildx-mdl4eo-cache-new,mode=max | |
- name: Move cache | |
run: | | |
rm -rf /tmp/.buildx-mdl4eo-cache | |
mv /tmp/.buildx-mdl4eo-cache-new /tmp/.buildx-mdl4eo-cache | |
- name: Build and push mdl4eo-latest | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
file: docker/mdl4eo/Dockerfile | |
tags: zooproject/zoo-project:mdl4eo-latest | |
cache-from: type=local,src=/tmp/.buildx-mdl4eo-cache | |
cache-to: type=local,dest=/tmp/.buildx-mdl4eo-cache-new,mode=max |