Build and push in one step so buildx container-driver runners work
This commit is contained in:
@@ -25,15 +25,13 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Log in to container registry
|
- name: Log in to container registry
|
||||||
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.gbrown.org -u "${{ secrets.REGISTRY_USER }}" --password-stdin
|
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.gbrown.org -u "${{ secrets.REGISTRY_USER }}" --password-stdin
|
||||||
# Fully-qualified tags from the start: unqualified names like
|
# One build-and-push step, fully-qualified tags, --push from the builder.
|
||||||
# `agentchat:latest` break on podman-backed runners, which resolve them
|
# This is the only form that works across all the runners: unqualified
|
||||||
# to docker.io/library/* instead of the local build.
|
# names resolve to docker.io/library/* on podman-backed daemons, and
|
||||||
- name: Build image
|
# buildx docker-container drivers keep plain builds in the build cache
|
||||||
run: docker build -f docker/Dockerfile -t git.gbrown.org/gib/agentchat:${{ gitea.sha }} -t git.gbrown.org/gib/agentchat:latest .
|
# where a separate push step can't see them.
|
||||||
- name: Push image
|
- name: Build and push image
|
||||||
run: |
|
run: docker build --push -f docker/Dockerfile -t git.gbrown.org/gib/agentchat:${{ gitea.sha }} -t git.gbrown.org/gib/agentchat:latest .
|
||||||
docker push git.gbrown.org/gib/agentchat:${{ gitea.sha }}
|
|
||||||
docker push git.gbrown.org/gib/agentchat:latest
|
|
||||||
|
|
||||||
# Watchtower on the VPS updates labelled containers nightly at 04:30; this
|
# Watchtower on the VPS updates labelled containers nightly at 04:30; this
|
||||||
# asks it to do so immediately. Non-fatal: the sweep still catches it.
|
# asks it to do so immediately. Non-fatal: the sweep still catches it.
|
||||||
|
|||||||
Reference in New Issue
Block a user