Skip to content

Commit 108d802

Browse files
authored
Add ability to tag latest images during publishing (#427)
1 parent 6a2ce25 commit 108d802

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/tox.yml

+2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ jobs:
6464
if: github.event_name == 'release' && github.event.action == 'published'
6565
run: |
6666
docker tag "ghcr.io/ansible/ansible-devspaces:${GITHUB_SHA}" "ghcr.io/ansible/ansible-devspaces:${{ github.event.release.tag_name }}"
67+
docker tag "ghcr.io/ansible/ansible-devspaces:${GITHUB_SHA}" "ghcr.io/ansible/ansible-devspaces:latest"
6768
docker push "ghcr.io/ansible/ansible-devspaces:${{ github.event.release.tag_name }}"
69+
docker push "ghcr.io/ansible/ansible-devspaces:latest"
6870
6971
publish-wheel:
7072
needs:

tools/ee.sh

+8-7
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,15 @@ if [ "--publish" == "${1:-}" ]; then
4242
${ADT_CONTAINER_ENGINE} pull -q "ghcr.io/ansible/community-ansible-dev-tools-tmp:${GITHUB_SHA:-}-arm64"
4343
${ADT_CONTAINER_ENGINE} pull -q "ghcr.io/ansible/community-ansible-dev-tools-tmp:${GITHUB_SHA:-}-amd64"
4444

45-
TAG=ghcr.io/ansible/community-ansible-dev-tools:${2:-}
46-
${ADT_CONTAINER_ENGINE} manifest create "$TAG" --amend "ghcr.io/ansible/community-ansible-dev-tools-tmp:${GITHUB_SHA:-}-amd64" --amend "ghcr.io/ansible/community-ansible-dev-tools-tmp:${GITHUB_SHA:-}-arm64"
47-
${ADT_CONTAINER_ENGINE} manifest annotate --arch arm64 "$TAG" "ghcr.io/ansible/community-ansible-dev-tools-tmp:${GITHUB_SHA:-}-arm64"
45+
for TAG in ghcr.io/ansible/community-ansible-dev-tools:${2:-} ghcr.io/ansible/community-ansible-dev-tools:latest; do
46+
${ADT_CONTAINER_ENGINE} manifest create "$TAG" --amend "ghcr.io/ansible/community-ansible-dev-tools-tmp:${GITHUB_SHA:-}-amd64" --amend "ghcr.io/ansible/community-ansible-dev-tools-tmp:${GITHUB_SHA:-}-arm64"
47+
${ADT_CONTAINER_ENGINE} manifest annotate --arch arm64 "$TAG" "ghcr.io/ansible/community-ansible-dev-tools-tmp:${GITHUB_SHA:-}-arm64"
4848

49-
# We push only when there is a release, and that is when $2 is not the same as GITHUB_SHA
50-
if [ "--dry" != "${3:-}" ]; then
51-
${ADT_CONTAINER_ENGINE} manifest push "$TAG"
52-
fi
49+
# We push only when there is a release, and that is when $2 is not the same as GITHUB_SHA
50+
if [ "--dry" != "${3:-}" ]; then
51+
${ADT_CONTAINER_ENGINE} manifest push "$TAG"
52+
fi
53+
done
5354
exit 0
5455
fi
5556

0 commit comments

Comments
 (0)