[Snyk] Security upgrade ubuntu from bionic-20221019 to bionic-20230308 #307
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 | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: docker/setup-buildx-action@v1 | |
- name: Cache Docker layers | |
uses: actions/cache@v2 | |
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@v2 | |
with: | |
context: . | |
push: true | |
tags: ${{secrets.DOCKER_USER}}/zookernel:${{ github.sha }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
- name: Move cache | |
run: | | |
rm -rf /tmp/.buildx-cache | |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
- name: Build and push latest | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: ${{secrets.DOCKER_USER}}/zookernel:latest | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
- name: Start the test env | |
run: mkdir docker/tmp; chmod 777 -R docker ; docker-compose up -d | |
- name: Install required package | |
run: docker exec zoo-project_zookernel_1 /bin/bash -c "apt-get update ; DEBIAN_FRONTEND=noninteractive apt-get -y install lynx;" | |
- name: Run GetCapabilities tests version 1.0.0 | |
run: docker exec zoo-project_zookernel_1 /bin/bash -c "cd /var/www/html/cptesting/scripts/; mkdir ../tmp; ./run.sh http://localhost/cgi-bin/zoo_loader.cgi 1.0.0 Buffer \"GetCapabilities\" 0 0 > outputGC.html 2> log; lynx -dump outputGC.html" | |
- name: Run DescribeProcess tests version 1.0.0 | |
run: docker exec zoo-project_zookernel_1 /bin/bash -c "cd /var/www/html/cptesting/scripts/; ./run.sh http://localhost/cgi-bin/zoo_loader.cgi 1.0.0 Buffer \"DescribeProcess\" 0 0 > outputDP.html 2> log; lynx -dump outputDP.html" | |
- name: Run ExecuteSync tests version 1.0.0 | |
run: docker exec zoo-project_zookernel_1 /bin/bash -c "cd /var/www/html/cptesting/scripts/; GEOSERVER=\"http://zoo-project.org:8080/geoserver/ows\" CPTESTING=\"http://localhost/cptesting/requests/\" ./run.sh http://localhost/cgi-bin/zoo_loader.cgi 1.0.0 Buffer \"ExecuteSync\" 0 0 > outputES.html 2> log; lynx -dump outputES.html" | |
- name: Run ExecuteAsync tests version 1.0.0 | |
run: docker exec zoo-project_zookernel_1 /bin/bash -c "cd /var/www/html/cptesting/scripts/; GEOSERVER=\"http://zoo-project.org:8080/geoserver/ows\" CPTESTING=\"http://localhost/cptesting/requests/\" ./run.sh http://localhost/cgi-bin/zoo_loader.cgi 1.0.0 Buffer \"ExecuteAsync\" 0 0 > outputEA.html 2> log; lynx -dump outputEA.html" | |
- name: Run GetCapabilities tests version 2.0.0 | |
run: docker exec zoo-project_zookernel_1 /bin/bash -c "sed \"s:version = 1.0.0:version = 2.0.0:g\" /usr/lib/cgi-bin/main.cfg > /usr/lib/cgi-bin/main.cfg1 ; cp /usr/lib/cgi-bin/main.cfg1 /usr/lib/cgi-bin/main.cfg; cd /var/www/html/cptesting/scripts/; mkdir ../tmp; ./run.sh http://localhost/cgi-bin/zoo_loader.cgi 2.0 Buffer \"GetCapabilities\" 0 0 > outputGC1.html 2> log; lynx -dump outputGC1.html" | |
- name: Run DescribeProcess tests version 2.0.0 | |
run: docker exec zoo-project_zookernel_1 /bin/bash -c "cd /var/www/html/cptesting/scripts/; mkdir ../tmp; ./run.sh http://localhost/cgi-bin/zoo_loader.cgi 2.0 Buffer \"DescribeProcess\" 0 0 > outputDP2.html 2> log; lynx -dump outputDP2.html" | |