diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index c13ba94..4e7e174 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -13,7 +13,7 @@ on: env: REGISTRY: git.plabble.org # Images in build order; later images build FROM the local base image. - IMAGES: base go infra + IMAGES: base go TAG: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref_name }} PUSH: ${{ github.event_name != 'pull_request' }} diff --git a/bin/devc b/bin/devc index 01fd319..7762639 100755 --- a/bin/devc +++ b/bin/devc @@ -60,16 +60,17 @@ main() { else die "no container name specified" fi - local name="${image%:*}" + local name="${image%:*}" tag="${image#*:}" + image="$name" # config.sh may override (e.g. image=base). # Start/Restart if not running or if arguments change configuration. if [[ -z "$(podman ps -q -f name="^$name$" -f status=running)" ]] || (($# > 0)); then - log "starting $image..." + log "starting $name:$tag..." default_args param_args "$@" - podman run --replace --stop-timeout 0 -td "${run_opts[@]}" "${DEVC_REGISTRY:-git.plabble.org/job79}/$image" + podman run --replace --stop-timeout 0 -td "${run_opts[@]}" "${DEVC_REGISTRY:-git.plabble.org/job79}/$image:$tag" fi exec podman exec --detach-keys "ctrl-@,ctrl-@" -it "$name" ${DEVC_COMMAND:-bash -l} diff --git a/containers/infra/Containerfile b/containers/infra/Containerfile deleted file mode 100644 index bee5ea1..0000000 --- a/containers/infra/Containerfile +++ /dev/null @@ -1,2 +0,0 @@ -ARG TAG=main -FROM git.plabble.org/job79/base:${TAG} diff --git a/containers/infra/config.sh b/containers/infra/config.sh index e9e170a..b853efd 100644 --- a/containers/infra/config.sh +++ b/containers/infra/config.sh @@ -1,2 +1,3 @@ #!/bin/bash +image=base run_opts+=("-v" "$HOME/Code/infra:/home/user/Code/infra")