Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: publish container with all version tags TDE-527 #299

Merged
merged 11 commits into from
Jan 19, 2023
11 changes: 11 additions & 0 deletions .github/scripts/publish_container.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
paulfouquet marked this conversation as resolved.
Show resolved Hide resolved

GIT_VERSION=$(git describe --tags --always --match 'v*')
XYZ_VERSION=${GIT_VERSION%-*-*}
paulfouquet marked this conversation as resolved.
Show resolved Hide resolved
XY_VERSION=${XYZ_VERSION%.*}
X_VERSION=${XY_VERSION%.*}

for version in "latest" ${X_VERSION} ${XY_VERSION} ${XYZ_VERSION} ${GIT_VERSION}; do
paulfouquet marked this conversation as resolved.
Show resolved Hide resolved
docker tag topo-imagery ghcr.io/linz/topo-imagery:$version
docker push ghcr.io/linz/topo-imagery:$version
done
8 changes: 2 additions & 6 deletions .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,5 @@ jobs:
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Publish Containers
run: |
GIT_VERSION=$(git describe --tags --always --match 'v*')
docker tag topo-imagery ghcr.io/linz/topo-imagery:${GIT_VERSION}
docker push ghcr.io/linz/topo-imagery:${GIT_VERSION}
docker tag topo-imagery ghcr.io/linz/topo-imagery:latest
docker push ghcr.io/linz/topo-imagery:latest
run: ./.github/scripts/publish_container.sh
shell: bash