[Snyk] Security upgrade ubuntu from jammy-20240227 to 22.04 #127
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 (DRU support) | |
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-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: ${{ runner.os }}-buildx- | |
- 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/dru/Dockerfile | |
tags: ${{secrets.DOCKER_USER}}/zookernel:dru-${{ github.sha }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
- name: Build and push (official dru image) | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
file: docker/dru/Dockerfile | |
tags: zooproject/zoo-project:dru-${{ github.sha }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
- name: Build and push (official eoepca image) | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
file: docker/dru/Dockerfile | |
build-args: | | |
CONDA_ENV_NAME=env_zoo_calrissian | |
PY_VER=3.10 | |
CONDA_ENV_FILE=https://raw.githubusercontent.com/EOEPCA/eoepca-proc-service-template/master/.devcontainer/environment.yml | |
tags: zooproject/zoo-project:eoepca-${{ github.sha }} | |
cache-from: type=local,src=/tmp/.buildx-eoepca-cache | |
cache-to: type=local,dest=/tmp/.buildx-eoepca-cache-new,mode=max | |
- name: Move cache | |
run: | | |
rm -rf /tmp/.buildx-cache | |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
rm -rf /tmp/.buildx-eoepca-cache | |
mv /tmp/.buildx-eoepca-cache-new /tmp/.buildx-eoepca-cache | |
- name: Build and push latest | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
file: docker/dru/Dockerfile | |
tags: ${{secrets.DOCKER_USER}}/zookernel:dru-latest | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
- name: Build and push latest | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
file: docker/dru/Dockerfile | |
tags: zooproject/zoo-project:dru-latest | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |