Skip to content

Commit c8ec9ff

Browse files
committed
ci: add auto docker image builds
1 parent 9178576 commit c8ec9ff

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and Push
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
packages: write
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Log in to Container Registry
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Build and push
30+
uses: docker/build-push-action@v5
31+
with:
32+
context: .
33+
push: true
34+
tags: ghcr.io/${{ github.repository }}:latest
35+
cache-from: type=gha
36+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)