Skip to content

Commit

Permalink
Use docker image import
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentao-Kuang committed Sep 30, 2024
1 parent 6b9af7d commit 7c54750
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
tags: |
ghcr.io/linz/basemaps/cli:latest
ghcr.io/linz/basemaps/cli:${{ steps.version.outputs.version }}
outputs: type=oci,dest=/tmp/cli.tar
outputs: type=oci,dest=/tmp/cli.oci
push: ${{github.ref == 'refs/heads/master' && startsWith(github.event.head_commit.message, 'release:') == false}}

- name: '@basemaps/cli - Build and push Major/Minor'
Expand All @@ -78,7 +78,7 @@ jobs:
ghcr.io/linz/basemaps/cli:${{ steps.version.outputs.version_major }}
ghcr.io/linz/basemaps/cli:${{ steps.version.outputs.version_major_minor }}
ghcr.io/linz/basemaps/cli:${{ steps.version.outputs.version }}
outputs: type=oci,dest=/tmp/cli.tar
outputs: type=oci,dest=/tmp/cli.oci
push: ${{github.ref == 'refs/heads/master' && startsWith(github.event.head_commit.message, 'release:')}}

- name: '@basemaps/server - Build and push'
Expand All @@ -89,7 +89,7 @@ jobs:
tags: |
ghcr.io/linz/basemaps/server:latest
ghcr.io/linz/basemaps/server:${{ steps.version.outputs.version }}
outputs: type=oci,dest=/tmp/server.tar
outputs: type=oci,dest=/tmp/server.oci
push: ${{github.ref == 'refs/heads/master' && startsWith(github.event.head_commit.message, 'release:') == false}}

- name: '@basemaps/server - Build and push Major/Minor'
Expand All @@ -103,13 +103,13 @@ jobs:
ghcr.io/linz/basemaps/server:${{ steps.version.outputs.version_major }}
ghcr.io/linz/basemaps/server:${{ steps.version.outputs.version_major_minor }}
ghcr.io/linz/basemaps/server:${{ steps.version.outputs.version }}
outputs: type=oci,dest=/tmp/server.tar
outputs: type=oci,dest=/tmp/server.oci
push: ${{github.ref == 'refs/heads/master' && startsWith(github.event.head_commit.message, 'release:')}}

- name: 'Validate Containers build'
run: |
docker load --input /tmp/cli.tar
docker image import cli.oci ghcr.io/linz/basemaps/cli:latest
docker run ghcr.io/linz/basemaps/cli:latest --help
docker load --input /tmp/server.tar
docker image import server.oci ghcr.io/linz/basemaps/server:latest
docker run ghcr.io/linz/basemaps/server:latest --help

0 comments on commit 7c54750

Please sign in to comment.