Skip to content
Source
Sign inSign up

eventlog-server.yml

48 lines1.6 KB

1name: Event Log Server Image
2on:
3 push:
4 branches: [main]
5 workflow_dispatch:
6​
7concurrency:
8 group: ${{ github.workflow }}-${{ github.ref }}
9 cancel-in-progress: true
10​
11permissions: {}
12​
13jobs:
14 image:
15 name: Build and Push
16 # Manual runs can target any branch, and this job publishes `latest`.
17 if: github.repository_owner == 'Effect-Ts' && github.ref == 'refs/heads/main'
18 runs-on: ubuntu-latest
19 timeout-minutes: 20
20 permissions:
21 contents: read
22 packages: write
23 steps:
24 - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
25 - uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
26 - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4
27 with:
28 registry: ghcr.io
29 username: ${{ github.actor }}
30 password: ${{ secrets.GITHUB_TOKEN }}
31 - id: meta
32 uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6
33 with:
34 images: ghcr.io/effect-ts/eventlog-server
35 tags: |
36 type=raw,value=latest
37 type=sha
38 - uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7
39 with:
40 context: .
41 file: packages/tools/eventlog-server/Dockerfile
42 # The bundle is built on the runner's platform, so arm64 needs no emulation.
43 platforms: linux/amd64,linux/arm64
44 push: true
45 tags: ${{ steps.meta.outputs.tags }}
46 labels: ${{ steps.meta.outputs.labels }}
47 cache-from: type=gha
48 cache-to: type=gha