blob: 9e89554b24a3c37c0b9f501a8c548d537cf4afa8 [file] [log] [blame]
version: 3
vars:
NAME: ghcr.io/sciabarracom/openserverless-devcontainer
TAG:
sh: git tag --sort=-creatordate | head -n 1 || "latest"
tasks:
default: task --list-all
show: "echo {{.NAME}}:{{.TAG}}"
update:
silent: true
cmds:
- jq . ../olaris/opsroot.json >_opsroot.orig
- jq '.config.images.devcontainer = "{{.NAME}}:{{.TAG}}"' ../olaris/opsroot.json >_opsroot.json
- diff _opsroot.orig _opsroot.json || cp -v _opsroot.json ../olaris/opsroot.json
image-tag:
- git tag -d "$(git tag)" || true
- git tag "0.1.0-incubating.$(date +%y%m%d%H%M)"
- echo {{.NAME}}:$(git tag --sort=-creatordate | head -n 1)
build:
- docker build -t "{{.NAME}}:{{.TAG}}" . --load
- task: show
clean:
- docker rm -f ssh-devcontainer || true
- docker images | awk '/<none>|devcontainer/{print $3}' | xargs docker rmi -f || true
build-and-tag:
- task: image-tag
- task: build