commands test
This commit is contained in:
@@ -5,37 +5,33 @@ when:
|
|||||||
event: [ cron, release, push, manual ]
|
event: [ cron, release, push, manual ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
test1:
|
cron_pre_check:
|
||||||
image: docker
|
image: docker
|
||||||
commands:
|
commands:
|
||||||
- docker pull php:8-fpm-alpine
|
- docker pull php:8-fpm-alpine
|
||||||
- docker pull vistanarvas/simple-laravel:dev-alpine
|
- docker pull vistanarvas/simple-laravel:dev-alpine
|
||||||
- BASE_IMG=$(docker inspect php:8-fpm-alpine --format='{{.Created}}' | cut -d '.' -f 1)
|
- BASE_IMG=$(docker inspect php:8-fpm-alpine --format='{{.Created}}' | cut -d '.' -f 1)
|
||||||
- PREV_IMG=$(docker inspect vistanarvas/simple-laravel:dev-alpine --format='{{.Created}}' | cut -d '.' -f 1)
|
- PREV_IMG=$(docker inspect vistanarvas/simple-laravel:dev-alpine --format='{{.Created}}' | cut -d '.' -f 1)
|
||||||
- echo $BASE_IMG
|
|
||||||
- echo $PREV_IMG
|
|
||||||
- BASE_DATE=$(date -D "%Y-%m-%dT%H:%M:%S" -d "$BASE_IMG" +%s)
|
- BASE_DATE=$(date -D "%Y-%m-%dT%H:%M:%S" -d "$BASE_IMG" +%s)
|
||||||
- PREV_DATE=$(date -D "%Y-%m-%dT%H:%M:%S" -d "$PREV_IMG" +%s)
|
- PREV_DATE=$(date -D "%Y-%m-%dT%H:%M:%S" -d "$PREV_IMG" +%s)
|
||||||
- echo $BASE_DATE
|
- if [ "$PREV_DATE" -gt "$BASE_DATE" ]; then touch SKIP_BUILD; fi
|
||||||
- echo $PREV_DATE
|
|
||||||
- if [ "$PREV_DATE" -gt "$BASE_DATE" ]; then echo "PREV is newer"; fi
|
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
|
||||||
|
dev_alpine_build_and_publish:
|
||||||
# dev_alpine_build_and_publish:
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
# image: woodpeckerci/plugin-docker-buildx
|
settings:
|
||||||
# settings:
|
username: vistanarvas
|
||||||
# username: vistanarvas
|
password:
|
||||||
# password:
|
from_secret: DOCKERHUB_TOKEN
|
||||||
# from_secret: DOCKERHUB_TOKEN
|
context: ./build
|
||||||
# context: ./build
|
repo: vistanarvas/${CI_REPO_NAME}
|
||||||
# repo: vistanarvas/${CI_REPO_NAME}
|
tag: ${CI_COMMIT_BRANCH}-alpine
|
||||||
# tag: ${CI_COMMIT_BRANCH}-alpine
|
dockerfile: Dockerfile_alpine
|
||||||
# dockerfile: Dockerfile_alpine
|
when:
|
||||||
# when:
|
evaluate: '! test -f "SKIP_BUILD"'
|
||||||
# branch:
|
branch:
|
||||||
# exclude: [ main, master ]
|
exclude: [ main, master ]
|
||||||
# path:
|
path:
|
||||||
# include: [ '.woodpecker/build_alpine.yml', 'build/*', 'Dockerfile_alpine' ]
|
include: [ '.woodpecker/build_alpine.yml', 'build/*', 'Dockerfile_alpine' ]
|
||||||
# event: [ push, manual ]
|
event: [ push, manual ]
|
||||||
Reference in New Issue
Block a user