Skip to content

Commit c8b72f3

Browse files
authored
Use shared build (#2)
1 parent 31cf555 commit c8b72f3

File tree

1 file changed

+7
-28
lines changed

1 file changed

+7
-28
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ci
1+
name: CI
22

33
on:
44
push:
@@ -10,31 +10,10 @@ on:
1010
branches:
1111
- "main"
1212

13-
env:
14-
REGISTRY: ghcr.io
15-
IMAGE_NAME: ${{ github.repository }}/console
16-
1713
jobs:
18-
build-and-push-image:
19-
runs-on: ubuntu-latest
20-
permissions:
21-
contents: read
22-
packages: write
23-
attestations: write
24-
id-token: write
25-
steps:
26-
- uses: actions/checkout@v5
27-
- uses: docker/setup-buildx-action@v3
28-
- uses: docker/login-action@v3
29-
if: github.event_name != 'pull_request'
30-
with:
31-
registry: ${{ env.REGISTRY }}
32-
username: ${{ github.actor }}
33-
password: ${{ secrets.GITHUB_TOKEN }}
34-
- uses: docker/build-push-action@v6
35-
with:
36-
context: .
37-
push: ${{ github.event_name != 'pull_request' }}
38-
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
39-
cache-from: type=gha
40-
cache-to: type=gha,mode=max
14+
main:
15+
uses: bsm/misc/.github/workflows/build-push-ghcr.yml@main
16+
with:
17+
image: ${{ github.repository }}/console
18+
tags: |
19+
type=raw,value=latest,enable={{is_default_branch}}

0 commit comments

Comments
 (0)