2023-02-05 14:04:02 +09:00
|
|
|
---
|
|
|
|
name: Dockle
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- develop
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
dockle:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
DOCKER_CONTENT_TRUST: 1
|
|
|
|
steps:
|
2023-10-19 19:35:13 +09:00
|
|
|
- uses: actions/checkout@v4.1.1
|
2023-02-05 14:04:02 +09:00
|
|
|
- run: |
|
|
|
|
curl -L -o dockle.deb "https://github.com/goodwithtech/dockle/releases/download/v0.4.10/dockle_0.4.10_Linux-64bit.deb"
|
|
|
|
sudo dpkg -i dockle.deb
|
|
|
|
- run: |
|
|
|
|
cp .config/docker_example.env .config/docker.env
|
|
|
|
cp ./docker-compose.yml.example ./docker-compose.yml
|
|
|
|
- run: |
|
|
|
|
docker compose up -d web
|
2023-02-06 03:25:40 +09:00
|
|
|
docker tag "$(docker compose images web | awk 'OFS=":" {print $4}' | tail -n +2)" cherrypick-web:latest
|
2023-02-05 14:04:02 +09:00
|
|
|
- run: |
|
2023-02-06 03:25:40 +09:00
|
|
|
cmd="dockle --exit-code 1 cherrypick-web:latest ${image_name}"
|
2023-02-05 14:04:02 +09:00
|
|
|
echo "> ${cmd}"
|
|
|
|
eval "${cmd}"
|