-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build test pr container for cli package.
- Loading branch information
1 parent
bd3357e
commit fa89057
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Pull Request Containers | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- labeled | ||
jobs: | ||
containers: | ||
name: Create containers | ||
runs-on: ubuntu-latest | ||
|
||
if: | | ||
github.event.label.name == 'container' | ||
environment: | ||
name: dev | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- uses: linz/action-typescript@v3 | ||
|
||
- name: Bundle & Package all files | ||
run: | | ||
npx lerna run bundle --stream | ||
npm pack --workspaces | ||
env: | ||
NODE_ENV: 'dev' | ||
|
||
- name: Set up Docker Qemu | ||
id: qemu | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Copy packages and files | ||
run: | | ||
# Files are packed into the base directory | ||
cp *.tgz packages/server/ | ||
cp *.tgz packages/cli/ | ||
cp -r packages/lambda-tiler/static/ packages/server/ | ||
cp -r packages/lambda-tiler/static/ packages/cli/ | ||
- name: Log in to registry | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | ||
|
||
- name: '@basemaps/cli - Build and push cli PR container' | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: packages/cli | ||
platforms: linux/arm64,linux/amd64 | ||
tags: 'ghcr.io/linz/basemaps/cli:pr-${{ github.event.number }}' | ||
push: true | ||
|
||
- name: '@basemaps/server - Build and push server PR container' | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: packages/server | ||
platforms: linux/arm64,linux/amd64 | ||
tags: ghcr.io/linz/basemaps/server:pr-${{ github.event.number }} | ||
push: true |