Skip to content

Commit 9726e2f

Browse files
authored
Merge branch 'master' into feat/cogify-add-background-color-support
2 parents 5397586 + 0450412 commit 9726e2f

File tree

2 files changed

+74
-2
lines changed

2 files changed

+74
-2
lines changed

.github/workflows/containers.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,13 @@ jobs:
5353
cp -r packages/lambda-tiler/static/ packages/server/
5454
cp -r packages/lambda-tiler/static/ packages/cli/
5555
56-
- name: Log in to registry
57-
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
56+
57+
- name: Login to GitHub Container Registry
58+
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
59+
with:
60+
registry: ghcr.io
61+
username: ${{ github.repository_owner }}
62+
password: ${{ secrets.GITHUB_TOKEN }}
5863

5964
- name: '@basemaps/cli - Build and export to Docker'
6065
uses: docker/build-push-action@v5
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Pull Request Containers
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
types: [labeled, synchronize, opened]
8+
9+
jobs:
10+
containers:
11+
name: Create containers
12+
runs-on: ubuntu-latest
13+
14+
if: |
15+
contains(github.event.pull_request.labels.*.name, 'container')
16+
17+
permissions:
18+
id-token: write
19+
contents: read
20+
packages: write
21+
22+
steps:
23+
- uses: linz/action-typescript@v3
24+
25+
- name: Bundle & Package all files
26+
run: |
27+
npx lerna run bundle --stream
28+
npm pack --workspaces
29+
30+
- name: Set up Docker Qemu
31+
id: qemu
32+
uses: docker/setup-qemu-action@v3
33+
34+
- name: Set up Docker Buildx
35+
id: buildx
36+
uses: docker/setup-buildx-action@v3
37+
38+
- name: Copy packages and files
39+
run: |
40+
# Files are packed into the base directory
41+
cp *.tgz packages/server/
42+
cp *.tgz packages/cli/
43+
cp -r packages/lambda-tiler/static/ packages/server/
44+
cp -r packages/lambda-tiler/static/ packages/cli/
45+
46+
- name: Login to GitHub Container Registry
47+
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
48+
with:
49+
registry: ghcr.io
50+
username: ${{ github.repository_owner }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
53+
- name: '@basemaps/cli - Build and push cli PR container'
54+
uses: docker/build-push-action@v5
55+
with:
56+
context: packages/cli
57+
platforms: linux/arm64,linux/amd64
58+
tags: 'ghcr.io/${{ github.repository }}/cli:pr-${{ github.event.number }}'
59+
push: true
60+
61+
- name: '@basemaps/server - Build and push server PR container'
62+
uses: docker/build-push-action@v5
63+
with:
64+
context: packages/server
65+
platforms: linux/arm64,linux/amd64
66+
tags: ghcr.io/${{ github.repository }}/server:pr-${{ github.event.number }}
67+
push: true

0 commit comments

Comments
 (0)